drm/omapdrm: dispc: Refuse x-decimation above 4 for all but 8-bit formats
Subsystems (3)
PATCH v2 1/1 drm/omapdrm: dispc: Refuse x-decimation above 4 for all but 8-bit formats
Let's disable all scaling that requires horizontal decimation with higher factor than 4, until we have better estimates of what we can and can not do. However, NV12 color format appears to work Ok with all decimation factors.
When decimating horizontally by more that 4 the dss is not able to fetch the data in burst mode. When this happens it is hard to tell if there enough bandwidth. Despite what theory says this appears to be true also for 16-bit color formats.
---
Chnages since first version:
- "color_mode_to_bpp(color_mode) > 8" -> "color_mode != OMAP_DSS_COLOR_NV12"
- commit message and comment updated too
- improve error print
drivers/gpu/drm/omapdrm/dss/dispc.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
drivers/gpu/drm/omapdrm/dss/dispc.c +19 -0
@@ -2506,6 +2506,25 @@ static int dispc_ovl_calc_scaling_44xx(unsigned long pclk, unsigned long lclk,return -EINVAL ; } +if (*decim_x >4 && color_mode !=OMAP_DSS_COLOR_NV12 ) { +/* +* Let's disable all scaling that requires horizontal +* decimation with higher factor than 4, until we have +* better estimates of what we can and can not +* do. However, NV12 color format appears to work Ok +* with all decimation factors. +* +* When decimating horizontally by more that 4 the dss +* is not able to fetch the data in burst mode. When +* this happens it is hard to tell if there enough +* bandwidth. Despite what theory says this appears to +* be true also for 16-bit color formats. +*/ +DSSERR ("Not enough bandwidth, too much downscaling (x-decimation factor %d > 4)" , *decim_x); + +return -EINVAL ; + } + *core_clk = dispc.feat->calc_core_clk (pclk, in_width, in_height, out_width, out_height, mem_to_mem);return 0 ;
Signature · 6 lines
1.9.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Hi Jyri,
Thank you for the patch.
Quoted 11 lines · On Wednesday 08 Feb 2017 16:08:06 Jyri Sarha wrote:
Let's disable all scaling that requires horizontal decimation with higher factor than 4, until we have better estimates of what we can and can not do. However, NV12 color format appears to work Ok with all decimation factors.
When decimating horizontally by more that 4 the dss is not able to fetch the data in burst mode. When this happens it is hard to tell if there enough bandwidth. Despite what theory says this appears to be true also for 16-bit color formats.
Signed-off-by Jyri Sarha <[email protected]>
Quoted 22 lines
---
Chnages since first version:
- "color_mode_to_bpp(color_mode)> 8" -> "color_mode!=OMAP_DSS_COLOR_NV12"
- commit message and comment updated too
- improve error printdrivers/gpu/drm/omapdrm/dss/dispc.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)(quoted diff) +0
-0
b/drivers/gpu/drm/omapdrm/dss/dispc.cindex 5554b72..d956e626 100644drivers/gpu/drm/omapdrm/dss/dispc.c +5
-0@@ -2506,6 +2506,25 @@ static int dispc_ovl_calc_scaling_44xx(unsigned long pclk, unsigned long lclk, return -EINVAL; } +if (*decim_x >4 && color_mode !=OMAP_DSS_COLOR_NV12 ) { +/* +* Let's disable all scaling that requires horizontal +* decimation with higher factor than 4, until we have +* better estimates of what we can and can not
drivers/gpu/drm/omapdrm/dss/dispc.c static int dispc_ovl_calc_scaling_44xx(unsigned long · line 2523
Quoted 10 lines
drivers/gpu/drm/omapdrm/dss/dispc.c +10
-0+* do. However, NV12 color format appears to work Ok +* with all decimation factors. +* +* When decimating horizontally by more that 4 the dss +* is not able to fetch the data in burst mode. When +* this happens it is hard to tell if there enough +* bandwidth. Despite what theory says this appears to +* be true also for 16-bit color formats. +*/ + DSSERR("Not enough bandwidth, too much downscaling (x-
decimation factor
Quoted 7 lines
%d > 4)",
*decim_x); +drivers/gpu/drm/omapdrm/dss/dispc.c +3
-0+return -EINVAL ; + } + *core_clk = dispc.feat->calc_core_clk (pclk, in_width, in_height, out_width, out_height, mem_to_mem);return 0 ;
Signature · 8 lines
Regards, Laurent Pinchart _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 11 lines · Jyri Sarha
Let's disable all scaling that requires horizontal decimation with higher factor than 4, until we have better estimates of what we can and can not do. However, NV12 color format appears to work Ok with all decimation factors.
When decimating horizontally by more that 4 the dss is not able to fetch the data in burst mode. When this happens it is hard to tell if there enough bandwidth. Despite what theory says this appears to be true also for 16-bit color formats.
Signed-off-by Jyri Sarha <[email protected]>
Quoted 8 lines
---
Chnages since first version:
- "color_mode_to_bpp(color_mode)> 8" -> "color_mode!=OMAP_DSS_COLOR_NV12"
- commit message and comment updated too
- improve error printdrivers/gpu/drm/omapdrm/dss/dispc.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
Thanks, I've picked this up.
Tomi
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel