drm/i915: pass adjusted_mode instead of mode to intel_choose_pipe_bpp_dither
Subsystems (2)
PATCH 1/1 drm/i915: pass adjusted_mode instead of mode to intel_choose_pipe_bpp_dither
The dithering introduced in
commit 3b5c78a35cf7511c15e09a9b0ffab290a42d9bcf
Author: Adam Jackson <[email protected]> Date: Tue Dec 13 15:41:00 2011 -0800
drm/i915/dp: Dither down to 6bpc if it makes the mode fit
stores the INTEL_MODE_DP_FORCE_6BPC flag in the private_flags of the adjusted mode, while intel_choose_pipe_bpp_dither() determining the color depth was passed the original mode, without the flag, so it would never have any effect. However, the BPC was clamped by VBT settings, making things work by coincidence, until that part was removed in
commit 4344b813f105a19f793f1fd93ad775b784648b95
Author: Daniel Vetter <[email protected]> Date: Fri Aug 10 11:10:20 2012 +0200
Pass adjusted_mode instead of mode to intel_choose_pipe_bpp_dither() to make INTEL_MODE_DP_FORCE_6BPC have effect.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=47621
--- drivers/gpu/drm/i915/intel_display.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_display.c +2 -1
@@ -4936,7 +4936,8 @@ static int ironlake_crtc_mode_set(struct drm_crtc *crtc,intel_crtc_update_cursor (crtc, true);/* determine panel color depth */ - dither =intel_choose_pipe_bpp_dither (crtc, fb, &intel_crtc->bpp, mode); + dither =intel_choose_pipe_bpp_dither (crtc, fb, &intel_crtc->bpp, + adjusted_mode);if (is_lvds && dev_priv->lvds_dither) dither = true;
Signature · 1 line
1.7.9.5
Quoted 18 lines · Jani Nikula
The dithering introduced in
commit
3b5c78a35cf7511c15e09a9b0ffab290a42d9bcfAuthor: Adam Jackson <[email protected]> Date: Tue Dec 13 15:41:00 2011 -0800drm/i915/dp: Dither down to 6bpc if it makes the mode fit
stores the
INTEL_MODE_DP_FORCE_6BPCflag in theprivate_flagsof the adjusted mode, whileintel_choose_pipe_bpp_dither()determining the color depth was passed the original mode, without the flag, so it would never have any effect. However, the BPC was clamped by VBT settings, making things work by coincidence, until that part was removed incommit
4344b813f105a19f793f1fd93ad775b784648b95Author: Daniel Vetter <[email protected]> Date: Fri Aug 10 11:10:20 2012 +0200
Quoted 6 lines
Pass
adjusted_modeinstead of mode tointel_choose_pipe_bpp_dither()to makeINTEL_MODE_DP_FORCE_6BPChave effect.Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=47621
Signed-off-by Jani Nikula <[email protected]>
Awesome piece of debugging here. But can I point you to i9xx_crtc_mode_set, where the same bug exists an ask for v2?
Cheers, Daniel
Quoted 21 lines
--- drivers/gpu/drm/i915/intel_display.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/intel_display.c +2
-1@@ -4936,7 +4936,8 @@ static int ironlake_crtc_mode_set(struct drm_crtc *crtc,intel_crtc_update_cursor (crtc, true);/* determine panel color depth */ - dither =intel_choose_pipe_bpp_dither (crtc, fb, &intel_crtc->bpp, mode); + dither =intel_choose_pipe_bpp_dither (crtc, fb, &intel_crtc->bpp, + adjusted_mode);if (is_lvds && dev_priv->lvds_dither) dither = true;Signature · 1 line
1.7.9.5
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
PATCH 1/1 drm/i915: use adjusted_mode instead of mode for checking the 6bpc force flag
In reply to Jani NikulaThe dithering introduced in
commit 3b5c78a35cf7511c15e09a9b0ffab290a42d9bcf
Author: Adam Jackson <[email protected]> Date: Tue Dec 13 15:41:00 2011 -0800
drm/i915/dp: Dither down to 6bpc if it makes the mode fit
stores the INTEL_MODE_DP_FORCE_6BPC flag in the private_flags of the adjusted mode, while i9xx_crtc_mode_set() and ironlake_crtc_mode_set() use the original mode, without the flag, so it would never have any effect. However, the BPC was clamped by VBT settings, making things work by coincidence, until that part was removed in
commit 4344b813f105a19f793f1fd93ad775b784648b95
Author: Daniel Vetter <[email protected]> Date: Fri Aug 10 11:10:20 2012 +0200
Use adjusted_mode instead of mode when checking for INTEL_MODE_DP_FORCE_6BPC to make the flag have effect.
v2: Don't forget to fix this in i9xx_crtc_mode_set() also, pointed out by Daniel both before and after sending the first patch.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=47621
--- drivers/gpu/drm/i915/intel_display.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_display.c +3 -2
@@ -4370,7 +4370,7 @@ static int i9xx_crtc_mode_set(struct drm_crtc *crtc,/* default to 8bpc */ pipeconf &= ~(PIPECONF_BPP_MASK |PIPECONF_DITHER_EN );if (is_dp) { -if (mode->private_flags &INTEL_MODE_DP_FORCE_6BPC ) { +if (adjusted_mode->private_flags &INTEL_MODE_DP_FORCE_6BPC ) { pipeconf |=PIPECONF_BPP_6 |PIPECONF_DITHER_EN |PIPECONF_DITHER_TYPE_SP ;
@@ -4936,7 +4936,8 @@ static int ironlake_crtc_mode_set(struct drm_crtc *crtc,intel_crtc_update_cursor (crtc, true);/* determine panel color depth */ - dither =intel_choose_pipe_bpp_dither (crtc, fb, &intel_crtc->bpp, mode); + dither =intel_choose_pipe_bpp_dither (crtc, fb, &intel_crtc->bpp, + adjusted_mode);if (is_lvds && dev_priv->lvds_dither) dither = true;
Signature · 1 line
1.7.9.5
Re: [PATCH] drm/i915: use adjusted_mode instead of mode for checking the 6bpc force flag
Quoted 15 lines · Jani Nikula
The dithering introduced in
commit
3b5c78a35cf7511c15e09a9b0ffab290a42d9bcfAuthor: Adam Jackson <[email protected]> Date: Tue Dec 13 15:41:00 2011 -0800drm/i915/dp: Dither down to 6bpc if it makes the mode fit
stores the
INTEL_MODE_DP_FORCE_6BPCflag in theprivate_flagsof the adjusted mode, whilei9xx_crtc_mode_set()andironlake_crtc_mode_set()use the original mode, without the flag, so it would never have any effect. However, the BPC was clamped by VBT settings, making things work by coincidence, until that part was removed incommit
4344b813f105a19f793f1fd93ad775b784648b95
Quoted 8 lines
Author: Daniel Vetter <[email protected]> Date: Fri Aug 10 11:10:20 2012 +0200Use
adjusted_modeinstead of mode when checking forINTEL_MODE_DP_FORCE_6BPCto make the flag have effect.v2: Don't forget to fix this in
i9xx_crtc_mode_set()also, pointed out by Daniel both before and after sending the first patch.
- ajax
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Daniel Vetter
AppliedRe: [PATCH] drm/i915: use adjusted_mode instead of mode for checking the 6bpc force flag
Quoted 19 lines · Adam Jackson
Quoted 18 lines · Jani Nikula
The dithering introduced in
commit
3b5c78a35cf7511c15e09a9b0ffab290a42d9bcfAuthor: Adam Jackson <[email protected]> Date: Tue Dec 13 15:41:00 2011 -0800drm/i915/dp: Dither down to 6bpc if it makes the mode fit
stores the
INTEL_MODE_DP_FORCE_6BPCflag in theprivate_flagsof the adjusted mode, whilei9xx_crtc_mode_set()andironlake_crtc_mode_set()use the original mode, without the flag, so it would never have any effect. However, the BPC was clamped by VBT settings, making things work by coincidence, until that part was removed incommit
4344b813f105a19f793f1fd93ad775b784648b95Author: Daniel Vetter <[email protected]> Date: Fri Aug 10 11:10:20 2012 +0200
Quoted 7 lines
Quoted 5 lines
Use
adjusted_modeinstead of mode when checking forINTEL_MODE_DP_FORCE_6BPCto make the flag have effect.v2: Don't forget to fix this in
i9xx_crtc_mode_set()also, pointed out by Daniel both before and after sending the first patch.Reviewed-by Adam Jackson <[email protected]>
Picked up for -fixes, thanks for the patch.
-Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch