Remove paranthesis that are not needed.
Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Braces {} are not necessary for single statement blocks.
Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
In order to upstream the micfil driver, we need to fix
missing space after if errors and warnings reported
by checkpatch.
Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
In order to upstream the micfil driver, we need to fix
line over 80 characters errors and warnings reported
by checkpatch.
Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
In order to upstream the micfil driver, we need to fix allignment
and code indent errors and warnings reported by checkpatch.
Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
strtab is always non-null so remove unnecessary check.
This is a follow up of patch
167a6d79f ("ASoC: fsl: Skip checking for string section type")
and finally fixes CID3901026
Reviewed-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
The HDMI/DP firmware verison will now be displayed.
Moved firmware handling to common file for HDMI and DisplayPort.
Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
Adobe ARGB gamut was selected even if the output pipe pixel encoding was
YUV. That produced a pink tint on the screen.
This patch will make sure the Adobe ARGB gamut is selected only when the
output pipe pixel encoding is RGB.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
DCSS HDR10 output pipe is always 10-bit. All we need to know to better
setup the LUTs and/or CSC matrices is the output colorspace.
This patch will fetch the CS from adjusted_mode's private_flags, as
indicated in the connector's mode_fixup phase.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
The HDMI sink may support different color depths for RGB and/or YUV
colorspaces. Currently, for mscale, 10-bit YUV420 is used only for
2160p@60. For the rest of modes 8-bit RGB is used.
This patch will add a mode_fixup() hook in the hdp_ops struct, allowing
each platform to perform a better handling of the various color depths
and colorspaces.
With the current patch, the RGB output will always be preferred to YUV
colorspaces, given the same color depth, since YUV colorspaces perform
UV subsampling, producing less quality. Also, whenever possible, better
color depth will be preferred (12-bit, 10-bit and, lastly, 8-bit).
The chosen colorspace and color depth will always be based on EDID's
Capability Map Data Block and YUV420 Video Data Block, as well as on
HDMI controller's known clock constraints.
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
In the case where lo_vag <= SGTL5000_LINE_OUT_GND_BASE, lo_vag
is set to zero and later vol_quot is computed by dividing by
lo_vag causing a division by zero error. Fix this by avoiding
a zero division and set vol_quot to zero in this specific case
so that the lowest setting for i is correctly set.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Both dataline_off and dataline_off_dsd fields are unsigned,
thus checking negative values make no sense. Use a signed
variable to calculate offset instead.
This fixes Coverity issue: CID1899299
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Save error so that the following error checking now make sense.
This fixes Coverity issue: CID2828734
Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
When hwvad is enabled, if you try to re-enable it again, it should fail.
However, we were also double setting state to OFF on fail, which is
wrong because it resets the state and allows the second retry to enable
even if it wasn't disabled before.
Now we only return EBUSY.
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
An unsigned value can never be negative, so this test will always
evaluate the same way.
Fixes Coverity issue CID3618200
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
There may be a null pointer dereference, or else the comparison against
null is unnecessary.
Fixes Coverity issue CID5327850
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Should use the correct build MARCO gcdANDROID to control android build.
Change-Id: I56a745b228a24ba502dc9771596aad78c1d8d808
Signed-off-by: Richard Liu <xuegang.liu@nxp.com>
there are lots of PFNs busy message when run GPU tests:
[ 622.370671] alloc_contig_range: [4ea70, 4ea7c) PFNs busy
[ 626.518072] alloc_contig_range: [4ea90, 4ea9c) PFNs busy
this problem is related with CMA migration for fragments,
move CMA allocator after GFP to avoid memory migration,
also fix CMA preempt for contiguous memory request.
can improve CTS and gpubench benchmarks on M850D.
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
HDMI power domain is under DC0, however DC0 is used by the first OS,
so domu has no permission to use HDMI.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Flynn xu <flynn.xu@nxp.com>
If camera is not connected and user try to use mem2mem function,
driver will return error but isi channel0 reference counter is
still increased by one. This will lead to mem2mem driver return
EBUSY error when user open mem2mem device, so correct this bug
in this patch.
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
The video mode tmp_m, as a local variable in tcon_cfg_videomode(),
is uninitialized and used to store a copy instance from the real
video mode. tcon_cfg_videomode() would change the timing of it if
side_by_side mode is enabled. Theoretically, there should be no
problem even if we don't initialize tmp_m. However, coverity
reports that tmp_m is an uninitialized scalar variable when the copy
is being done(CID 5233067: Uninitialized scalar variable (UNINIT)).
This patch fixes the issue reported by coverity.
Signed-off-by: Liu Ying <victor.liu@nxp.com>
The logic in function h/vscaler_pixengcfg_dynamic_src_sel() to avoid
overrunning array src_sel[i][j] is wrong. The correct one is to check
on the index i which should be less than the array size of h/vs_id_array[].
This patch fixes the potential array overrunning issue, that is,
out-of-bounds array read issue. The issue is reported by coverity -
CID 1477349 and CID 1477345.
Signed-off-by: Liu Ying <victor.liu@nxp.com>
alloc_contig_range easily return -EBUSY when try to isolate pages,
there are lots of messages with PFNs busy when run GPU tests.
[ 622.370671] alloc_contig_range: [4ea70, 4ea7c) PFNs busy
[ 626.518072] alloc_contig_range: [4ea90, 4ea9c) PFNs busy
these problems are related wht CMA migration for fragments,
need enlarge GPU reserved size to reduce CMA fragments.
Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
The callers of dpu_{unit}_init() might provide an invalid id as
the parameter, it may cause overrunning dpu->{unit}_priv[] and
cf_shdlreqs[] arrays and out-of-bound array access. Although
the current only caller is dpu_submodules_init() and it always
provides valid ids, it would be good to fix the potential issue.
This patch fixes several issues reported by coverity - CID 1477330,
CID 1477335, CID 1477348, CID 1477346, CID 3298619, CID 1477347,
CID 5233021 and CID 1477321.
Signed-off-by: Liu Ying <victor.liu@nxp.com>
The function get_xval() returns the C_XVAL and L_XVAL fields of
the CURPIXELCNT and LASTPIXELCNT registers. They are 16bit and
sit in the low 16bit of the registers. This patch fixes the way
we mask the register and read the fields out.
Signed-off-by: Liu Ying <victor.liu@nxp.com>
e_shstrndx already contains the section header index, so
shdr->sh_type will always be SHT_STRTAB.
Remove this redundant check and make Coverity happy.
Fixes: CID3901026
Reviewed-by: Cosmin-Gabriel Samoila <cosmin.samoila@nxp.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>