All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ander Conselvan de Oliveira <conselvan2@gmail.com>
To: Matt Roper <matthew.d.roper@intel.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 09/10] drm/i915: Switch plane properties to full atomic helper.
Date: Thu, 22 Jan 2015 19:16:12 +0200	[thread overview]
Message-ID: <54C1305C.701@gmail.com> (raw)
In-Reply-To: <1421886949-26704-10-git-send-email-matthew.d.roper@intel.com>

Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com>

On 01/22/2015 02:35 AM, Matt Roper wrote:
> This will exercise our atomic pipeline for legacy property updates.
>
> Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
> ---
>   drivers/gpu/drm/i915/intel_atomic_plane.c |  9 +++++++++
>   drivers/gpu/drm/i915/intel_display.c      |  3 ++-
>   drivers/gpu/drm/i915/intel_sprite.c       | 26 --------------------------
>   3 files changed, 11 insertions(+), 27 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_atomic_plane.c b/drivers/gpu/drm/i915/intel_atomic_plane.c
> index 4a3914f..9e6f727 100644
> --- a/drivers/gpu/drm/i915/intel_atomic_plane.c
> +++ b/drivers/gpu/drm/i915/intel_atomic_plane.c
> @@ -118,6 +118,15 @@ static int intel_plane_atomic_check(struct drm_plane *plane,
>   	intel_crtc = to_intel_crtc(crtc);
>
>   	/*
> +	 * Both crtc and plane->crtc could be NULL if we're updating a
> +	 * property while the plane is disabled.  We don't actually have
> +	 * anything driver-specific we need to test in that case, so
> +	 * just return success.
> +	 */
> +	if (!crtc)
> +		return 0;
> +
> +	/*
>   	 * The original src/dest coordinates are stored in state->base, but
>   	 * we want to keep another copy internal to our driver that we can
>   	 * clip/modify ourselves.
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index db20773..90b788a 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -37,6 +37,7 @@
>   #include <drm/i915_drm.h>
>   #include "i915_drv.h"
>   #include "i915_trace.h"
> +#include <drm/drm_atomic_helper.h>
>   #include <drm/drm_dp_helper.h>
>   #include <drm/drm_crtc_helper.h>
>   #include <drm/drm_plane_helper.h>
> @@ -12055,7 +12056,7 @@ const struct drm_plane_funcs intel_plane_funcs = {
>   	.update_plane = drm_plane_helper_update,
>   	.disable_plane = drm_plane_helper_disable,
>   	.destroy = intel_plane_destroy,
> -	.set_property = intel_plane_set_property,
> +	.set_property = drm_atomic_helper_plane_set_property,
>   	.atomic_get_property = intel_plane_atomic_get_property,
>   	.atomic_set_property = intel_plane_atomic_set_property,
>   	.atomic_duplicate_state = intel_plane_duplicate_state,
> diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
> index 50683d4..0a52c44 100644
> --- a/drivers/gpu/drm/i915/intel_sprite.c
> +++ b/drivers/gpu/drm/i915/intel_sprite.c
> @@ -1362,32 +1362,6 @@ out_unlock:
>   	return ret;
>   }
>
> -int intel_plane_set_property(struct drm_plane *plane,
> -			     struct drm_property *prop,
> -			     uint64_t val)
> -{
> -	struct drm_device *dev = plane->dev;
> -	uint64_t old_val;
> -	int ret = -ENOENT;
> -
> -	if (prop == dev->mode_config.rotation_property) {
> -		/* exactly one rotation angle please */
> -		if (hweight32(val & 0xf) != 1)
> -			return -EINVAL;
> -
> -		if (plane->state->rotation == val)
> -			return 0;
> -
> -		old_val = plane->state->rotation;
> -		plane->state->rotation = val;
> -		ret = intel_plane_restore(plane);
> -		if (ret)
> -			plane->state->rotation = old_val;
> -	}
> -
> -	return ret;
> -}
> -
>   int intel_plane_restore(struct drm_plane *plane)
>   {
>   	if (!plane->crtc || !plane->fb)
>

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

  reply	other threads:[~2015-01-22 17:16 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-22  0:35 [PATCH 00/10] i915 nuclear pageflip (v2) Matt Roper
2015-01-22  0:35 ` [PATCH 01/10] drm: Add rotation value to plane state Matt Roper
2015-01-22  0:35 ` [PATCH 02/10] drm/i915: Move rotation from intel_plane to drm_plane_state Matt Roper
2015-01-22 10:54   ` Ander Conselvan de Oliveira
2015-01-22  0:35 ` [PATCH 03/10] drm/i915: Consolidate plane handler vtables Matt Roper
2015-01-22  0:35 ` [PATCH 04/10] drm/i915: Add .atomic_{get, set}_property() entrypoints to planes Matt Roper
2015-01-22 11:09   ` Ander Conselvan de Oliveira
2015-01-22  0:35 ` [PATCH 05/10] drm/i915: Add main atomic entrypoints (v2) Matt Roper
2015-01-22 12:52   ` Ander Conselvan de Oliveira
2015-01-22  0:35 ` [PATCH 06/10] drm/i915: Setup dummy atomic state for connectors (v2) Matt Roper
2015-01-22 16:00   ` Ander Conselvan de Oliveira
2015-01-23  0:50     ` [PATCH 06/10] drm/i915: Setup dummy atomic state for connectors (v3) Matt Roper
2015-01-23  5:42       ` Ander Conselvan de Oliveira
2015-01-22  0:35 ` [PATCH 07/10] drm/i915: Add atomic_get_property entrypoint for connectors Matt Roper
2015-01-22 16:55   ` Ander Conselvan de Oliveira
2015-01-23  0:51     ` [PATCH 07/10] drm/i915: Add atomic_get_property entrypoint for connectors (v2) Matt Roper
2015-01-23  5:43       ` Ander Conselvan de Oliveira
2015-01-22  0:35 ` [PATCH 08/10] drm/i915: Add crtc state duplication/destruction functions Matt Roper
2015-01-22 17:08   ` Ander Conselvan de Oliveira
2015-01-22  0:35 ` [PATCH 09/10] drm/i915: Switch plane properties to full atomic helper Matt Roper
2015-01-22 17:16   ` Ander Conselvan de Oliveira [this message]
2015-01-22  0:35 ` [PATCH 10/10] drm/i915: Add i915.nuclear_pageflip command line param to force atomic (v3) Matt Roper
2015-01-22 17:32   ` Ander Conselvan de Oliveira
2015-01-23  0:53     ` [PATCH 10/10] drm/i915: Add i915.nuclear_pageflip command line param to force atomic (v4) Matt Roper
2015-01-27  9:22       ` Daniel Vetter

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=54C1305C.701@gmail.com \
    --to=conselvan2@gmail.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=matthew.d.roper@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 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.