public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: James Ausmus <james.ausmus@intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 09/10] drm/i915: Use plane->get_hw_state() for initial plane fb readout
Date: Thu, 16 Nov 2017 15:49:48 -0800	[thread overview]
Message-ID: <20171116234946.GC6676@jausmus-gentoo-dev6.jf.intel.com> (raw)
In-Reply-To: <20171013135839.21119-10-ville.syrjala@linux.intel.com>

On Fri, Oct 13, 2017 at 04:58:38PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Since we now have a ->get_hw_state() method for planes, let's use
> that during the initial plane fb readout.
> 
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reviewed-by: James Ausmus <james.ausmus@intel.com>

> ---
>  drivers/gpu/drm/i915/intel_display.c | 30 ++++++++++++++++--------------
>  1 file changed, 16 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 2da670628e35..268d320690f4 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -7465,19 +7465,20 @@ i9xx_get_initial_plane_config(struct intel_crtc *crtc,
>  	struct drm_framebuffer *fb;
>  	struct intel_framebuffer *intel_fb;
>  
> +	if (!plane->get_hw_state(plane))
> +		return;
> +
> +	intel_fb = kzalloc(sizeof(*intel_fb), GFP_KERNEL);
> +	if (!intel_fb) {
> +		DRM_DEBUG_KMS("failed to alloc fb\n");
> +		return;
> +	}
> +
> +	fb = &intel_fb->base;
> +
> +	fb->dev = dev;
> +
>  	val = I915_READ(DSPCNTR(plane_id));
> -	if (!(val & DISPLAY_PLANE_ENABLE))
> -		return;
> -
> -	intel_fb = kzalloc(sizeof(*intel_fb), GFP_KERNEL);
> -	if (!intel_fb) {
> -		DRM_DEBUG_KMS("failed to alloc fb\n");
> -		return;
> -	}
> -
> -	fb = &intel_fb->base;
> -
> -	fb->dev = dev;
>  
>  	if (INTEL_GEN(dev_priv) >= 4) {
>  		if (val & DISPPLANE_TILED) {
> @@ -8496,6 +8497,9 @@ skylake_get_initial_plane_config(struct intel_crtc *crtc,
>  	struct drm_framebuffer *fb;
>  	struct intel_framebuffer *intel_fb;
>  
> +	if (!plane->get_hw_state(plane))
> +		return;
> +
>  	intel_fb = kzalloc(sizeof(*intel_fb), GFP_KERNEL);
>  	if (!intel_fb) {
>  		DRM_DEBUG_KMS("failed to alloc fb\n");
> @@ -8507,8 +8511,6 @@ skylake_get_initial_plane_config(struct intel_crtc *crtc,
>  	fb->dev = dev;
>  
>  	val = I915_READ(PLANE_CTL(pipe, plane_id));
> -	if (!(val & PLANE_CTL_ENABLE))
> -		goto error;
>  
>  	pixel_format = val & PLANE_CTL_FORMAT_MASK;
>  	fourcc = skl_format_to_fourcc(pixel_format,
> -- 
> 2.13.6
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2017-11-16 23:48 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-13 13:58 [PATCH v2 00/10] drm/i915: Plane assert/readout cleanups etc Ville Syrjala
2017-10-13 13:58 ` [PATCH v2 01/10] drm/i915: Add .get_hw_state() method for planes Ville Syrjala
2017-10-13 17:36   ` [PATCH v3 " Ville Syrjala
2017-10-23 14:50   ` [PATCH v4 " Ville Syrjala
2017-10-13 13:58 ` [PATCH v3 02/10] drm/i915: Redo plane sanitation during readout Ville Syrjala
2017-10-13 13:58 ` [PATCH v3 03/10] drm/i915: s/enum plane/enum i9xx_plane_id/ Ville Syrjala
2017-10-13 17:37   ` [PATCH v4 " Ville Syrjala
2017-10-23 14:50   ` [PATCH v5 " Ville Syrjala
2017-11-16 23:21     ` James Ausmus
2017-11-17 15:41       ` Ville Syrjälä
2017-10-13 13:58 ` [PATCH v2 04/10] drm/i915: Use enum i9xx_plane_id for the .get_fifo_size() hooks Ville Syrjala
2017-10-13 13:58 ` [PATCH v3 05/10] drm/i915: Cleanup enum pipe/enum plane_id/enum i9xx_plane_id in initial fb readout Ville Syrjala
2017-10-13 13:58 ` [PATCH 06/10] drm/i915: Nuke ironlake_get_initial_plane_config() Ville Syrjala
2017-10-13 13:58 ` [PATCH 07/10] drm/i915: Switch fbc over to for_each_new_intel_plane_in_state() Ville Syrjala
2017-10-13 13:58 ` [PATCH v2 08/10] drm/i915: Nuke crtc->plane Ville Syrjala
2017-10-23 14:51   ` [PATCH v3 " Ville Syrjala
2017-10-13 13:58 ` [PATCH 09/10] drm/i915: Use plane->get_hw_state() for initial plane fb readout Ville Syrjala
2017-11-16 23:49   ` James Ausmus [this message]
2017-10-13 13:58 ` [PATCH 10/10] drm/i915: Add rudimentary plane state verification Ville Syrjala
2017-11-02 16:38   ` [PATCH v2 " Ville Syrjala
2017-11-17  0:07     ` James Ausmus
2017-10-13 16:24 ` ✗ Fi.CI.BAT: warning for drm/i915: Plane assert/readout cleanups etc. (rev2) Patchwork
2017-10-13 16:53   ` Ville Syrjälä
2017-10-13 18:05 ` ✓ Fi.CI.BAT: success for drm/i915: Plane assert/readout cleanups etc. (rev4) Patchwork
2017-10-13 23:20 ` ✗ Fi.CI.IGT: warning for drm/i915: Plane assert/readout cleanups etc. (rev2) Patchwork
2017-10-14  2:35 ` ✗ Fi.CI.IGT: failure for drm/i915: Plane assert/readout cleanups etc. (rev4) Patchwork
2017-10-23 15:10 ` ✓ Fi.CI.BAT: success for drm/i915: Plane assert/readout cleanups etc. (rev7) Patchwork
2017-10-23 16:09 ` ✓ Fi.CI.IGT: " Patchwork
2017-11-02 17:06 ` ✓ Fi.CI.BAT: success for drm/i915: Plane assert/readout cleanups etc. (rev8) Patchwork
2017-11-02 18:13 ` ✓ Fi.CI.IGT: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171116234946.GC6676@jausmus-gentoo-dev6.jf.intel.com \
    --to=james.ausmus@intel.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ville.syrjala@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox