* Re: [PATCH] drm/i915: pass adjusted_mode instead of mode to intel_choose_pipe_bpp_dither
2012-09-26 15:27 [PATCH] drm/i915: pass adjusted_mode instead of mode to intel_choose_pipe_bpp_dither Jani Nikula
@ 2012-09-26 15:25 ` Daniel Vetter
2012-09-26 15:43 ` [PATCH] drm/i915: use adjusted_mode instead of mode for checking the 6bpc force flag Jani Nikula
1 sibling, 0 replies; 5+ messages in thread
From: Daniel Vetter @ 2012-09-26 15:25 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx, stable
On Wed, Sep 26, 2012 at 06:27:51PM +0300, Jani Nikula wrote:
> The dithering introduced in
>
> commit 3b5c78a35cf7511c15e09a9b0ffab290a42d9bcf
> Author: Adam Jackson <ajax@redhat.com>
> 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 <daniel.vetter@ffwll.ch>
> 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
> CC: stable@vger.kernel.org
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
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
> ---
> drivers/gpu/drm/i915/intel_display.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 08c3f69..0a9802a 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -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;
>
> --
> 1.7.9.5
>
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] drm/i915: pass adjusted_mode instead of mode to intel_choose_pipe_bpp_dither
@ 2012-09-26 15:27 Jani Nikula
2012-09-26 15:25 ` Daniel Vetter
2012-09-26 15:43 ` [PATCH] drm/i915: use adjusted_mode instead of mode for checking the 6bpc force flag Jani Nikula
0 siblings, 2 replies; 5+ messages in thread
From: Jani Nikula @ 2012-09-26 15:27 UTC (permalink / raw)
To: intel-gfx, daniel; +Cc: jani.nikula, stable
The dithering introduced in
commit 3b5c78a35cf7511c15e09a9b0ffab290a42d9bcf
Author: Adam Jackson <ajax@redhat.com>
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 <daniel.vetter@ffwll.ch>
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
CC: stable@vger.kernel.org
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/intel_display.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 08c3f69..0a9802a 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -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;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] drm/i915: use adjusted_mode instead of mode for checking the 6bpc force flag
2012-09-26 15:27 [PATCH] drm/i915: pass adjusted_mode instead of mode to intel_choose_pipe_bpp_dither Jani Nikula
2012-09-26 15:25 ` Daniel Vetter
@ 2012-09-26 15:43 ` Jani Nikula
2012-09-26 15:50 ` Adam Jackson
1 sibling, 1 reply; 5+ messages in thread
From: Jani Nikula @ 2012-09-26 15:43 UTC (permalink / raw)
To: intel-gfx, daniel; +Cc: jani.nikula, stable
The dithering introduced in
commit 3b5c78a35cf7511c15e09a9b0ffab290a42d9bcf
Author: Adam Jackson <ajax@redhat.com>
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 <daniel.vetter@ffwll.ch>
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
CC: Adam Jackson <ajax@redhat.com>
CC: stable@vger.kernel.org
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
drivers/gpu/drm/i915/intel_display.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 08c3f69..16a0895 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -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;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/i915: use adjusted_mode instead of mode for checking the 6bpc force flag
2012-09-26 15:43 ` [PATCH] drm/i915: use adjusted_mode instead of mode for checking the 6bpc force flag Jani Nikula
@ 2012-09-26 15:50 ` Adam Jackson
2012-09-27 6:42 ` Daniel Vetter
0 siblings, 1 reply; 5+ messages in thread
From: Adam Jackson @ 2012-09-26 15:50 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx, stable
[-- Attachment #1.1: Type: text/plain, Size: 1100 bytes --]
On Wed, 2012-09-26 at 18:43 +0300, Jani Nikula wrote:
> The dithering introduced in
>
> commit 3b5c78a35cf7511c15e09a9b0ffab290a42d9bcf
> Author: Adam Jackson <ajax@redhat.com>
> 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 <daniel.vetter@ffwll.ch>
> 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.
Reviewed-by: Adam Jackson <ajax@redhat.com>
- ajax
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/i915: use adjusted_mode instead of mode for checking the 6bpc force flag
2012-09-26 15:50 ` Adam Jackson
@ 2012-09-27 6:42 ` Daniel Vetter
0 siblings, 0 replies; 5+ messages in thread
From: Daniel Vetter @ 2012-09-27 6:42 UTC (permalink / raw)
To: Adam Jackson; +Cc: Jani Nikula, intel-gfx, stable
On Wed, Sep 26, 2012 at 11:50:36AM -0400, Adam Jackson wrote:
> On Wed, 2012-09-26 at 18:43 +0300, Jani Nikula wrote:
> > The dithering introduced in
> >
> > commit 3b5c78a35cf7511c15e09a9b0ffab290a42d9bcf
> > Author: Adam Jackson <ajax@redhat.com>
> > 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 <daniel.vetter@ffwll.ch>
> > 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.
>
> Reviewed-by: Adam Jackson <ajax@redhat.com>
Picked up for -fixes, thanks for the patch.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-09-27 6:43 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-26 15:27 [PATCH] drm/i915: pass adjusted_mode instead of mode to intel_choose_pipe_bpp_dither Jani Nikula
2012-09-26 15:25 ` Daniel Vetter
2012-09-26 15:43 ` [PATCH] drm/i915: use adjusted_mode instead of mode for checking the 6bpc force flag Jani Nikula
2012-09-26 15:50 ` Adam Jackson
2012-09-27 6:42 ` Daniel Vetter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.