public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: fix fastboot pfit disable hack to update pipe w/h
@ 2013-12-19 18:48 Jesse Barnes
  2014-01-06 23:31 ` Jesse Barnes
  0 siblings, 1 reply; 6+ messages in thread
From: Jesse Barnes @ 2013-12-19 18:48 UTC (permalink / raw)
  To: intel-gfx

When fastbooting, we read out the pipe timings early on, and then in a
panel fitted config, disable the fitter later.  But we weren't updating
the pipe src h/w, which meant the mouse cursor was clipped to the
pfitted size rather than the native size set later.  Fix that up so the
cursor is visible in the new mode.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
---
 drivers/gpu/drm/i915/intel_display.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 4d1357a..7e46d75 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -2382,6 +2382,8 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
 			I915_WRITE(PF_WIN_POS(intel_crtc->pipe), 0);
 			I915_WRITE(PF_WIN_SZ(intel_crtc->pipe), 0);
 		}
+		intel_crtc->config.pipe_src_w = adjusted_mode->crtc_hdisplay;
+		intel_crtc->config.pipe_src_h = adjusted_mode->crtc_vdisplay;
 	}
 
 	ret = dev_priv->display.update_plane(crtc, fb, x, y);
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/i915: fix fastboot pfit disable hack to update pipe w/h
  2013-12-19 18:48 [PATCH] drm/i915: fix fastboot pfit disable hack to update pipe w/h Jesse Barnes
@ 2014-01-06 23:31 ` Jesse Barnes
  2014-01-07  7:07   ` Daniel Vetter
  0 siblings, 1 reply; 6+ messages in thread
From: Jesse Barnes @ 2014-01-06 23:31 UTC (permalink / raw)
  Cc: intel-gfx

On Thu, 19 Dec 2013 10:48:01 -0800
Jesse Barnes <jbarnes@virtuousgeek.org> wrote:

> When fastbooting, we read out the pipe timings early on, and then in a
> panel fitted config, disable the fitter later.  But we weren't updating
> the pipe src h/w, which meant the mouse cursor was clipped to the
> pfitted size rather than the native size set later.  Fix that up so the
> cursor is visible in the new mode.
> 
> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> ---
>  drivers/gpu/drm/i915/intel_display.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 4d1357a..7e46d75 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -2382,6 +2382,8 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
>  			I915_WRITE(PF_WIN_POS(intel_crtc->pipe), 0);
>  			I915_WRITE(PF_WIN_SZ(intel_crtc->pipe), 0);
>  		}
> +		intel_crtc->config.pipe_src_w = adjusted_mode->crtc_hdisplay;
> +		intel_crtc->config.pipe_src_h = adjusted_mode->crtc_vdisplay;
>  	}
>  
>  	ret = dev_priv->display.update_plane(crtc, fb, x, y);

References: https://bugzilla.kernel.org/show_bug.cgi?id=67591

-- 
Jesse Barnes, Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/i915: fix fastboot pfit disable hack to update pipe w/h
  2014-01-06 23:31 ` Jesse Barnes
@ 2014-01-07  7:07   ` Daniel Vetter
  2014-01-07 18:51     ` Jesse Barnes
  2014-01-07 18:52     ` Jesse Barnes
  0 siblings, 2 replies; 6+ messages in thread
From: Daniel Vetter @ 2014-01-07  7:07 UTC (permalink / raw)
  To: Jesse Barnes; +Cc: intel-gfx

On Tue, Jan 7, 2014 at 12:31 AM, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> On Thu, 19 Dec 2013 10:48:01 -0800
> Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
>
>> When fastbooting, we read out the pipe timings early on, and then in a
>> panel fitted config, disable the fitter later.  But we weren't updating
>> the pipe src h/w, which meant the mouse cursor was clipped to the
>> pfitted size rather than the native size set later.  Fix that up so the
>> cursor is visible in the new mode.
>>
>> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
>> ---
>>  drivers/gpu/drm/i915/intel_display.c |    2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
>> index 4d1357a..7e46d75 100644
>> --- a/drivers/gpu/drm/i915/intel_display.c
>> +++ b/drivers/gpu/drm/i915/intel_display.c
>> @@ -2382,6 +2382,8 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
>>                       I915_WRITE(PF_WIN_POS(intel_crtc->pipe), 0);
>>                       I915_WRITE(PF_WIN_SZ(intel_crtc->pipe), 0);
>>               }
>> +             intel_crtc->config.pipe_src_w = adjusted_mode->crtc_hdisplay;
>> +             intel_crtc->config.pipe_src_h = adjusted_mode->crtc_vdisplay;
>>       }
>>
>>       ret = dev_priv->display.update_plane(crtc, fb, x, y);
>
> References: https://bugzilla.kernel.org/show_bug.cgi?id=67591

The bug report doesn't say anything about the pipe config state
checker being unhappy. Are we missing a call to the checker for
fastboot somewhere to catch this stuff?
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/i915: fix fastboot pfit disable hack to update pipe w/h
  2014-01-07  7:07   ` Daniel Vetter
@ 2014-01-07 18:51     ` Jesse Barnes
  2014-01-07 18:52     ` Jesse Barnes
  1 sibling, 0 replies; 6+ messages in thread
From: Jesse Barnes @ 2014-01-07 18:51 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: intel-gfx

On Tue, 7 Jan 2014 08:07:13 +0100
Daniel Vetter <daniel@ffwll.ch> wrote:

> On Tue, Jan 7, 2014 at 12:31 AM, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> > On Thu, 19 Dec 2013 10:48:01 -0800
> > Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> >
> >> When fastbooting, we read out the pipe timings early on, and then in a
> >> panel fitted config, disable the fitter later.  But we weren't updating
> >> the pipe src h/w, which meant the mouse cursor was clipped to the
> >> pfitted size rather than the native size set later.  Fix that up so the
> >> cursor is visible in the new mode.
> >>
> >> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> >> ---
> >>  drivers/gpu/drm/i915/intel_display.c |    2 ++
> >>  1 file changed, 2 insertions(+)
> >>
> >> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> >> index 4d1357a..7e46d75 100644
> >> --- a/drivers/gpu/drm/i915/intel_display.c
> >> +++ b/drivers/gpu/drm/i915/intel_display.c
> >> @@ -2382,6 +2382,8 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
> >>                       I915_WRITE(PF_WIN_POS(intel_crtc->pipe), 0);
> >>                       I915_WRITE(PF_WIN_SZ(intel_crtc->pipe), 0);
> >>               }
> >> +             intel_crtc->config.pipe_src_w = adjusted_mode->crtc_hdisplay;
> >> +             intel_crtc->config.pipe_src_h = adjusted_mode->crtc_vdisplay;
> >>       }
> >>
> >>       ret = dev_priv->display.update_plane(crtc, fb, x, y);
> >
> > References: https://bugzilla.kernel.org/show_bug.cgi?id=67591
> 
> The bug report doesn't say anything about the pipe config state
> checker being unhappy. Are we missing a call to the checker for
> fastboot somewhere to catch this stuff?

Yeah I think so.  Cooking up a separate patch for that now...

-- 
Jesse Barnes, Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/i915: fix fastboot pfit disable hack to update pipe w/h
  2014-01-07  7:07   ` Daniel Vetter
  2014-01-07 18:51     ` Jesse Barnes
@ 2014-01-07 18:52     ` Jesse Barnes
  2014-01-07 20:08       ` Daniel Vetter
  1 sibling, 1 reply; 6+ messages in thread
From: Jesse Barnes @ 2014-01-07 18:52 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: intel-gfx

On Tue, 7 Jan 2014 08:07:13 +0100
Daniel Vetter <daniel@ffwll.ch> wrote:

> On Tue, Jan 7, 2014 at 12:31 AM, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> > On Thu, 19 Dec 2013 10:48:01 -0800
> > Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> >
> >> When fastbooting, we read out the pipe timings early on, and then in a
> >> panel fitted config, disable the fitter later.  But we weren't updating
> >> the pipe src h/w, which meant the mouse cursor was clipped to the
> >> pfitted size rather than the native size set later.  Fix that up so the
> >> cursor is visible in the new mode.
> >>
> >> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> >> ---
> >>  drivers/gpu/drm/i915/intel_display.c |    2 ++
> >>  1 file changed, 2 insertions(+)
> >>
> >> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> >> index 4d1357a..7e46d75 100644
> >> --- a/drivers/gpu/drm/i915/intel_display.c
> >> +++ b/drivers/gpu/drm/i915/intel_display.c
> >> @@ -2382,6 +2382,8 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
> >>                       I915_WRITE(PF_WIN_POS(intel_crtc->pipe), 0);
> >>                       I915_WRITE(PF_WIN_SZ(intel_crtc->pipe), 0);
> >>               }
> >> +             intel_crtc->config.pipe_src_w = adjusted_mode->crtc_hdisplay;
> >> +             intel_crtc->config.pipe_src_h = adjusted_mode->crtc_vdisplay;
> >>       }
> >>
> >>       ret = dev_priv->display.update_plane(crtc, fb, x, y);
> >
> > References: https://bugzilla.kernel.org/show_bug.cgi?id=67591
> 
> The bug report doesn't say anything about the pipe config state
> checker being unhappy. Are we missing a call to the checker for
> fastboot somewhere to catch this stuff?

Ah no, we do have a check there.  I guess since we never updated it we
were comparing two stale values?

-- 
Jesse Barnes, Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/i915: fix fastboot pfit disable hack to update pipe w/h
  2014-01-07 18:52     ` Jesse Barnes
@ 2014-01-07 20:08       ` Daniel Vetter
  0 siblings, 0 replies; 6+ messages in thread
From: Daniel Vetter @ 2014-01-07 20:08 UTC (permalink / raw)
  To: Jesse Barnes; +Cc: intel-gfx

On Tue, Jan 7, 2014 at 7:52 PM, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
>> >> index 4d1357a..7e46d75 100644
>> >> --- a/drivers/gpu/drm/i915/intel_display.c
>> >> +++ b/drivers/gpu/drm/i915/intel_display.c
>> >> @@ -2382,6 +2382,8 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
>> >>                       I915_WRITE(PF_WIN_POS(intel_crtc->pipe), 0);
>> >>                       I915_WRITE(PF_WIN_SZ(intel_crtc->pipe), 0);
>> >>               }
>> >> +             intel_crtc->config.pipe_src_w = adjusted_mode->crtc_hdisplay;
>> >> +             intel_crtc->config.pipe_src_h = adjusted_mode->crtc_vdisplay;
>> >>       }
>> >>
>> >>       ret = dev_priv->display.update_plane(crtc, fb, x, y);
>> >
>> > References: https://bugzilla.kernel.org/show_bug.cgi?id=67591
>>
>> The bug report doesn't say anything about the pipe config state
>> checker being unhappy. Are we missing a call to the checker for
>> fastboot somewhere to catch this stuff?
>
> Ah no, we do have a check there.  I guess since we never updated it we
> were comparing two stale values?

The hw values should reflect what we're writing into the PF_WIN_*
registers, but the sw side should be stale. I think a dpms on/off
should trigger a checker warning, but having one after each
fastboot'ed setCrtc might be benefitial in general. I just want to
make sure that we don't have more dragons lurking ...
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-01-07 20:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-19 18:48 [PATCH] drm/i915: fix fastboot pfit disable hack to update pipe w/h Jesse Barnes
2014-01-06 23:31 ` Jesse Barnes
2014-01-07  7:07   ` Daniel Vetter
2014-01-07 18:51     ` Jesse Barnes
2014-01-07 18:52     ` Jesse Barnes
2014-01-07 20:08       ` Daniel Vetter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox