Re: [Intel-gfx] [PATCH] drm/i915: Don't just say it, actually force edp vdd

2014-03-05 Thread Daniel Vetter
On Tue, Mar 04, 2014 at 08:17:36AM +, Chris Wilson wrote:
> On Tue, Mar 04, 2014 at 12:42:44AM +0100, Patrik Jakobsson wrote:
> > This patch fixes the blank screen bug introduced in 3.14-rc1 on the
> > MacBook Air 6,2. The comments state that we need to force edp vdd so
> > lets put it back.
> > 
> > The regression was introduced by the following commit:
> > 
> > commit dff392dbd258381a6c3164f38420593f2d291e3b
> > Author: Paulo Zanoni 
> > Date:   Fri Dec 6 17:32:41 2013 -0200
> > 
> > drm/i915: don't touch the VDD when disabling the panel
> > 
> > v2: Wrap intel_disable_dp() with _vdd_on and _vdd_off
> > 
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74628
> > Cc: Paulo Zanoni 
> > Cc: Chris Wilson 
> > Signed-off-by: Patrik Jakobsson 
> 
> This brings the code into line with the comments, and has the bonus of
> working on a fiddly panel, so
> 
> Acked-by: Chris Wilson 
> 
> I don't feel confident enough with the DP sequencing to say why it has
> to be so though.

Regression fixes win, we can figure this out later again. Queued for
-next, thanks for the patch.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH] drm/i915: Don't just say it, actually force edp vdd

2014-03-04 Thread Chris Wilson
On Tue, Mar 04, 2014 at 12:42:44AM +0100, Patrik Jakobsson wrote:
> This patch fixes the blank screen bug introduced in 3.14-rc1 on the
> MacBook Air 6,2. The comments state that we need to force edp vdd so
> lets put it back.
> 
> The regression was introduced by the following commit:
> 
> commit dff392dbd258381a6c3164f38420593f2d291e3b
> Author: Paulo Zanoni 
> Date:   Fri Dec 6 17:32:41 2013 -0200
> 
> drm/i915: don't touch the VDD when disabling the panel
> 
> v2: Wrap intel_disable_dp() with _vdd_on and _vdd_off
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74628
> Cc: Paulo Zanoni 
> Cc: Chris Wilson 
> Signed-off-by: Patrik Jakobsson 

This brings the code into line with the comments, and has the bonus of
working on a fiddly panel, so

Acked-by: Chris Wilson 

I don't feel confident enough with the DP sequencing to say why it has
to be so though.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH] drm/i915: Don't just say it, actually force edp vdd

2014-03-03 Thread Patrik Jakobsson
This patch fixes the blank screen bug introduced in 3.14-rc1 on the
MacBook Air 6,2. The comments state that we need to force edp vdd so
lets put it back.

The regression was introduced by the following commit:

commit dff392dbd258381a6c3164f38420593f2d291e3b
Author: Paulo Zanoni 
Date:   Fri Dec 6 17:32:41 2013 -0200

drm/i915: don't touch the VDD when disabling the panel

v2: Wrap intel_disable_dp() with _vdd_on and _vdd_off

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74628
Cc: Paulo Zanoni 
Cc: Chris Wilson 
Signed-off-by: Patrik Jakobsson 
---
 drivers/gpu/drm/i915/intel_dp.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 57552eb..6da1fcb 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1252,7 +1252,8 @@ void ironlake_edp_panel_off(struct intel_dp *intel_dp)
pp = ironlake_get_pp_control(intel_dp);
/* We need to switch off panel power _and_ force vdd, for otherwise some
 * panels get very unhappy and cease to work. */
-   pp &= ~(POWER_TARGET_ON | PANEL_POWER_RESET | EDP_BLC_ENABLE);
+   pp &= ~(POWER_TARGET_ON | PANEL_POWER_RESET | EDP_FORCE_VDD |
+   EDP_BLC_ENABLE);
 
pp_ctrl_reg = _pp_ctrl_reg(intel_dp);
 
@@ -1784,9 +1785,11 @@ static void intel_disable_dp(struct intel_encoder 
*encoder)
 
/* Make sure the panel is off before trying to change the mode. But also
 * ensure that we have vdd while we switch off the panel. */
+   ironlake_edp_panel_vdd_on(intel_dp);
ironlake_edp_backlight_off(intel_dp);
intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_OFF);
ironlake_edp_panel_off(intel_dp);
+   ironlake_edp_panel_vdd_off(intel_dp, true);
 
/* cpu edp my only be disable _after_ the cpu pipe/plane is disabled. */
if (!(port == PORT_A || IS_VALLEYVIEW(dev)))
-- 
1.8.3.2

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [PATCH] drm/i915: Don't just say it, actually force edp vdd

2014-03-02 Thread Chris Wilson
On Sun, Mar 02, 2014 at 01:05:06AM +0100, Patrik Jakobsson wrote:
> This solves the blank screen problem on the MacBook Air 6,2. The
> comments state that we need to force edp vdd so lets put it back. The
> EDP_FORCE_VDD bit was removed in commit:
> 
> commit dff392dbd258381a6c3164f38420593f2d291e3b
> drm/i915: don't touch the VDD when disabling the panel
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74628
> Cc: Paulo Zanoni 
> Cc: Chris Wilson 
> Signed-off-by: Patrik Jakobsson 
> ---
>  drivers/gpu/drm/i915/intel_dp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 57552eb..44de6f7 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -1252,7 +1252,7 @@ void ironlake_edp_panel_off(struct intel_dp *intel_dp)
>   pp = ironlake_get_pp_control(intel_dp);
>   /* We need to switch off panel power _and_ force vdd, for otherwise some
>* panels get very unhappy and cease to work. */
> - pp &= ~(POWER_TARGET_ON | PANEL_POWER_RESET | EDP_BLC_ENABLE);
> + pp &= ~(POWER_TARGET_ON | EDP_FORCE_VDD | PANEL_POWER_RESET | 
> EDP_BLC_ENABLE);
>  
>   pp_ctrl_reg = _pp_ctrl_reg(intel_dp);

I'd feel more comfortable with;

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 46d065b..876184f 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1872,9 +1872,11 @@ static void intel_disable_dp(struct intel_encoder 
*encoder)
 
/* Make sure the panel is off before trying to change the mode. But also
 * ensure that we have vdd while we switch off the panel. */
+   edp_panel_vdd_on(intel_dp);
intel_edp_backlight_off(intel_dp);
intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_OFF);
intel_edp_panel_off(intel_dp);
+   edp_panel_vdd_off(intel_dp, true);
 
/* cpu edp my only be disable _after_ the cpu pipe/plane is disabled. */
if (!(port == PORT_A || IS_VALLEYVIEW(dev)))

Or that vdd_off may have to be post-disable.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH] drm/i915: Don't just say it, actually force edp vdd

2014-03-01 Thread Patrik Jakobsson
This solves the blank screen problem on the MacBook Air 6,2. The
comments state that we need to force edp vdd so lets put it back. The
EDP_FORCE_VDD bit was removed in commit:

commit dff392dbd258381a6c3164f38420593f2d291e3b
drm/i915: don't touch the VDD when disabling the panel

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74628
Cc: Paulo Zanoni 
Cc: Chris Wilson 
Signed-off-by: Patrik Jakobsson 
---
 drivers/gpu/drm/i915/intel_dp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 57552eb..44de6f7 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1252,7 +1252,7 @@ void ironlake_edp_panel_off(struct intel_dp *intel_dp)
pp = ironlake_get_pp_control(intel_dp);
/* We need to switch off panel power _and_ force vdd, for otherwise some
 * panels get very unhappy and cease to work. */
-   pp &= ~(POWER_TARGET_ON | PANEL_POWER_RESET | EDP_BLC_ENABLE);
+   pp &= ~(POWER_TARGET_ON | EDP_FORCE_VDD | PANEL_POWER_RESET | 
EDP_BLC_ENABLE);
 
pp_ctrl_reg = _pp_ctrl_reg(intel_dp);
 
-- 
1.8.3.2

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx