From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 07/12] drm/i915: Add aliases for uapi and hw to plane_state
Date: Thu, 31 Oct 2019 16:53:15 +0200 [thread overview]
Message-ID: <20191031145315.GA1208@intel.com> (raw)
In-Reply-To: <20191031112610.27608-7-maarten.lankhorst@linux.intel.com>
On Thu, Oct 31, 2019 at 12:26:05PM +0100, Maarten Lankhorst wrote:
> Prepare to split up hw and uapi machinally, by adding a uapi and
> hw alias. We will remove the base in a bit. This is a split from the
> original uapi/hw patch, which did it all in one go.
>
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> ---
> .../gpu/drm/i915/display/intel_atomic_plane.c | 16 ++++++++--------
> .../gpu/drm/i915/display/intel_display_types.h | 8 ++++++--
> 2 files changed, 14 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.c b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> index 4558c0b29fc1..393fb97a3dca 100644
> --- a/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> +++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> @@ -80,22 +80,20 @@ void intel_plane_free(struct intel_plane *plane)
> struct drm_plane_state *
> intel_plane_duplicate_state(struct drm_plane *plane)
> {
> - struct drm_plane_state *state;
> struct intel_plane_state *intel_state;
>
> - intel_state = kmemdup(plane->state, sizeof(*intel_state), GFP_KERNEL);
> + intel_state = to_intel_plane_state(plane->state);
> + intel_state = kmemdup(intel_state, sizeof(*intel_state), GFP_KERNEL);
>
> if (!intel_state)
> return NULL;
>
> - state = &intel_state->base;
> -
> - __drm_atomic_helper_plane_duplicate_state(plane, state);
> + __drm_atomic_helper_plane_duplicate_state(plane, &intel_state->base);
>
> intel_state->vma = NULL;
> intel_state->flags = 0;
>
> - return state;
> + return &intel_state->base;
Could use a bit of cleanup on the variable names, but let's do that
later.
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> }
>
> /**
> @@ -110,9 +108,11 @@ void
> intel_plane_destroy_state(struct drm_plane *plane,
> struct drm_plane_state *state)
> {
> - WARN_ON(to_intel_plane_state(state)->vma);
> + struct intel_plane_state *plane_state = to_intel_plane_state(state);
> + WARN_ON(plane_state->vma);
>
> - drm_atomic_helper_plane_destroy_state(plane, state);
> + __drm_atomic_helper_plane_destroy_state(&plane_state->base);
> + kfree(plane_state);
> }
>
> unsigned int intel_plane_data_rate(const struct intel_crtc_state *crtc_state,
> diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
> index 9319ca682105..6036b2b3980b 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_types.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_types.h
> @@ -523,7 +523,11 @@ struct intel_atomic_state {
> };
>
> struct intel_plane_state {
> - struct drm_plane_state base;
> + union {
> + struct drm_plane_state base;
> + struct drm_plane_state uapi;
> + struct drm_plane_state hw;
> + };
> struct i915_ggtt_view view;
> struct i915_vma *vma;
> unsigned long flags;
> @@ -1143,7 +1147,7 @@ struct cxsr_latency {
> #define to_intel_encoder(x) container_of(x, struct intel_encoder, base)
> #define to_intel_framebuffer(x) container_of(x, struct intel_framebuffer, base)
> #define to_intel_plane(x) container_of(x, struct intel_plane, base)
> -#define to_intel_plane_state(x) container_of(x, struct intel_plane_state, base)
> +#define to_intel_plane_state(x) container_of(x, struct intel_plane_state, uapi)
> #define intel_fb_obj(x) ((x) ? to_intel_bo((x)->obj[0]) : NULL)
>
> struct intel_hdmi {
> --
> 2.24.0.rc1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
WARNING: multiple messages have this Message-ID (diff)
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 07/12] drm/i915: Add aliases for uapi and hw to plane_state
Date: Thu, 31 Oct 2019 16:53:15 +0200 [thread overview]
Message-ID: <20191031145315.GA1208@intel.com> (raw)
Message-ID: <20191031145315.f2cZgiBovrJJIRtzMDiMh2c4wLdJ6ECiiGJxnnKym1Y@z> (raw)
In-Reply-To: <20191031112610.27608-7-maarten.lankhorst@linux.intel.com>
On Thu, Oct 31, 2019 at 12:26:05PM +0100, Maarten Lankhorst wrote:
> Prepare to split up hw and uapi machinally, by adding a uapi and
> hw alias. We will remove the base in a bit. This is a split from the
> original uapi/hw patch, which did it all in one go.
>
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> ---
> .../gpu/drm/i915/display/intel_atomic_plane.c | 16 ++++++++--------
> .../gpu/drm/i915/display/intel_display_types.h | 8 ++++++--
> 2 files changed, 14 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.c b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> index 4558c0b29fc1..393fb97a3dca 100644
> --- a/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> +++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> @@ -80,22 +80,20 @@ void intel_plane_free(struct intel_plane *plane)
> struct drm_plane_state *
> intel_plane_duplicate_state(struct drm_plane *plane)
> {
> - struct drm_plane_state *state;
> struct intel_plane_state *intel_state;
>
> - intel_state = kmemdup(plane->state, sizeof(*intel_state), GFP_KERNEL);
> + intel_state = to_intel_plane_state(plane->state);
> + intel_state = kmemdup(intel_state, sizeof(*intel_state), GFP_KERNEL);
>
> if (!intel_state)
> return NULL;
>
> - state = &intel_state->base;
> -
> - __drm_atomic_helper_plane_duplicate_state(plane, state);
> + __drm_atomic_helper_plane_duplicate_state(plane, &intel_state->base);
>
> intel_state->vma = NULL;
> intel_state->flags = 0;
>
> - return state;
> + return &intel_state->base;
Could use a bit of cleanup on the variable names, but let's do that
later.
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> }
>
> /**
> @@ -110,9 +108,11 @@ void
> intel_plane_destroy_state(struct drm_plane *plane,
> struct drm_plane_state *state)
> {
> - WARN_ON(to_intel_plane_state(state)->vma);
> + struct intel_plane_state *plane_state = to_intel_plane_state(state);
> + WARN_ON(plane_state->vma);
>
> - drm_atomic_helper_plane_destroy_state(plane, state);
> + __drm_atomic_helper_plane_destroy_state(&plane_state->base);
> + kfree(plane_state);
> }
>
> unsigned int intel_plane_data_rate(const struct intel_crtc_state *crtc_state,
> diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
> index 9319ca682105..6036b2b3980b 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_types.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_types.h
> @@ -523,7 +523,11 @@ struct intel_atomic_state {
> };
>
> struct intel_plane_state {
> - struct drm_plane_state base;
> + union {
> + struct drm_plane_state base;
> + struct drm_plane_state uapi;
> + struct drm_plane_state hw;
> + };
> struct i915_ggtt_view view;
> struct i915_vma *vma;
> unsigned long flags;
> @@ -1143,7 +1147,7 @@ struct cxsr_latency {
> #define to_intel_encoder(x) container_of(x, struct intel_encoder, base)
> #define to_intel_framebuffer(x) container_of(x, struct intel_framebuffer, base)
> #define to_intel_plane(x) container_of(x, struct intel_plane, base)
> -#define to_intel_plane_state(x) container_of(x, struct intel_plane_state, base)
> +#define to_intel_plane_state(x) container_of(x, struct intel_plane_state, uapi)
> #define intel_fb_obj(x) ((x) ? to_intel_bo((x)->obj[0]) : NULL)
>
> struct intel_hdmi {
> --
> 2.24.0.rc1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-10-31 14:53 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-31 11:25 [PATCH 01/12] drm/i915: Handle a few more cases for crtc hw/uapi split, v3 Maarten Lankhorst
2019-10-31 11:25 ` [Intel-gfx] " Maarten Lankhorst
2019-10-31 11:26 ` [PATCH 02/12] drm/i915: Add aliases for uapi and hw to crtc_state Maarten Lankhorst
2019-10-31 11:26 ` [Intel-gfx] " Maarten Lankhorst
2019-10-31 14:52 ` Ville Syrjälä
2019-10-31 14:52 ` [Intel-gfx] " Ville Syrjälä
2019-10-31 11:26 ` [PATCH 03/12] drm/i915: Perform manual conversions for crtc uapi/hw split, v2 Maarten Lankhorst
2019-10-31 11:26 ` [Intel-gfx] " Maarten Lankhorst
2019-10-31 11:26 ` [PATCH 04/12] drm/i915: Perform automated conversions for crtc uapi/hw split, base -> hw Maarten Lankhorst
2019-10-31 11:26 ` [Intel-gfx] " Maarten Lankhorst
2019-10-31 11:26 ` [PATCH 05/12] drm/i915: Perform automated conversions for crtc uapi/hw split, base -> uapi Maarten Lankhorst
2019-10-31 11:26 ` [Intel-gfx] " Maarten Lankhorst
2019-10-31 11:26 ` [PATCH 06/12] drm/i915: Complete crtc hw/uapi split, v6 Maarten Lankhorst
2019-10-31 11:26 ` [Intel-gfx] " Maarten Lankhorst
2019-10-31 14:44 ` Ville Syrjälä
2019-10-31 14:44 ` [Intel-gfx] " Ville Syrjälä
2019-10-31 11:26 ` [PATCH 07/12] drm/i915: Add aliases for uapi and hw to plane_state Maarten Lankhorst
2019-10-31 11:26 ` [Intel-gfx] " Maarten Lankhorst
2019-10-31 14:53 ` Ville Syrjälä [this message]
2019-10-31 14:53 ` Ville Syrjälä
2019-10-31 11:26 ` [PATCH 08/12] drm/i915: Perform manual conversions for plane uapi/hw split, v2 Maarten Lankhorst
2019-10-31 11:26 ` [Intel-gfx] " Maarten Lankhorst
2019-10-31 11:26 ` [PATCH 09/12] drm/i915: Perform automated conversions for plane uapi/hw split, base -> hw Maarten Lankhorst
2019-10-31 11:26 ` [Intel-gfx] " Maarten Lankhorst
2019-10-31 14:49 ` Ville Syrjälä
2019-10-31 14:49 ` [Intel-gfx] " Ville Syrjälä
2019-10-31 11:26 ` [PATCH 10/12] drm/i915: Perform automated conversions for plane uapi/hw split, base -> uapi Maarten Lankhorst
2019-10-31 11:26 ` [Intel-gfx] " Maarten Lankhorst
2019-10-31 11:26 ` [PATCH 11/12] drm/i915: Complete plane hw and uapi split, v2 Maarten Lankhorst
2019-10-31 11:26 ` [Intel-gfx] " Maarten Lankhorst
2019-10-31 11:26 ` [PATCH 12/12] drm/i915: Remove special case slave handling during hw programming, v3 Maarten Lankhorst
2019-10-31 11:26 ` [Intel-gfx] " Maarten Lankhorst
2019-10-31 14:08 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [01/12] drm/i915: Handle a few more cases for crtc hw/uapi split, v3 Patchwork
2019-10-31 14:08 ` [Intel-gfx] " Patchwork
2019-10-31 14:31 ` ✓ Fi.CI.BAT: success " Patchwork
2019-10-31 14:31 ` [Intel-gfx] " Patchwork
2019-11-01 14:22 ` ✓ Fi.CI.IGT: " Patchwork
2019-11-01 14:22 ` [Intel-gfx] " 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=20191031145315.GA1208@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=maarten.lankhorst@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