From: Ville Syrjala <ville.syrjala@linux.intel.com> To: intel-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Subject: [PATCH 5/5] drm/i915: Introduce intel_plane_state_reset() Date: Thu, 7 Nov 2019 16:24:17 +0200 [thread overview] Message-ID: <20191107142417.11107-5-ville.syrjala@linux.intel.com> (raw) In-Reply-To: <20191107142417.11107-1-ville.syrjala@linux.intel.com> From: Ville Syrjälä <ville.syrjala@linux.intel.com> For the sake of symmetry with the crtc stuff let's add a helper to reset the plane state to sane default values. For the moment this only gets caller from the plane init. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> --- drivers/gpu/drm/i915/display/intel_atomic_plane.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.c b/drivers/gpu/drm/i915/display/intel_atomic_plane.c index 42b3b3449d2e..9429b8e17270 100644 --- a/drivers/gpu/drm/i915/display/intel_atomic_plane.c +++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.c @@ -41,6 +41,16 @@ #include "intel_pm.h" #include "intel_sprite.h" +static void intel_plane_state_reset(struct intel_plane_state *plane_state, + struct intel_plane *plane) +{ + memset(plane_state, 0, sizeof(*plane_state)); + + __drm_atomic_helper_plane_state_reset(&plane_state->uapi, &plane->base); + + plane_state->scaler_id = -1; +} + struct intel_plane *intel_plane_alloc(void) { struct intel_plane_state *plane_state; @@ -56,8 +66,9 @@ struct intel_plane *intel_plane_alloc(void) return ERR_PTR(-ENOMEM); } - __drm_atomic_helper_plane_reset(&plane->base, &plane_state->uapi); - plane_state->scaler_id = -1; + intel_plane_state_reset(plane_state, plane); + + plane->base.state = &plane_state->uapi; return plane; } -- 2.23.0 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
WARNING: multiple messages have this Message-ID (diff)
From: Ville Syrjala <ville.syrjala@linux.intel.com> To: intel-gfx@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org Subject: [Intel-gfx] [PATCH 5/5] drm/i915: Introduce intel_plane_state_reset() Date: Thu, 7 Nov 2019 16:24:17 +0200 [thread overview] Message-ID: <20191107142417.11107-5-ville.syrjala@linux.intel.com> (raw) Message-ID: <20191107142417.OjrgCJyfDvTfysePbV95_eGkophoUSpP4LTy9vmthTU@z> (raw) In-Reply-To: <20191107142417.11107-1-ville.syrjala@linux.intel.com> From: Ville Syrjälä <ville.syrjala@linux.intel.com> For the sake of symmetry with the crtc stuff let's add a helper to reset the plane state to sane default values. For the moment this only gets caller from the plane init. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> --- drivers/gpu/drm/i915/display/intel_atomic_plane.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.c b/drivers/gpu/drm/i915/display/intel_atomic_plane.c index 42b3b3449d2e..9429b8e17270 100644 --- a/drivers/gpu/drm/i915/display/intel_atomic_plane.c +++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.c @@ -41,6 +41,16 @@ #include "intel_pm.h" #include "intel_sprite.h" +static void intel_plane_state_reset(struct intel_plane_state *plane_state, + struct intel_plane *plane) +{ + memset(plane_state, 0, sizeof(*plane_state)); + + __drm_atomic_helper_plane_state_reset(&plane_state->uapi, &plane->base); + + plane_state->scaler_id = -1; +} + struct intel_plane *intel_plane_alloc(void) { struct intel_plane_state *plane_state; @@ -56,8 +66,9 @@ struct intel_plane *intel_plane_alloc(void) return ERR_PTR(-ENOMEM); } - __drm_atomic_helper_plane_reset(&plane->base, &plane_state->uapi); - plane_state->scaler_id = -1; + intel_plane_state_reset(plane_state, plane); + + plane->base.state = &plane_state->uapi; return plane; } -- 2.23.0 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-11-07 14:24 UTC|newest] Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-11-07 14:24 [PATCH 1/5] drm: Add __drm_atomic_helper_crtc_state_reset() & co Ville Syrjala 2019-11-07 14:24 ` [Intel-gfx] " Ville Syrjala 2019-11-07 14:24 ` Ville Syrjala 2019-11-07 14:24 ` [PATCH 2/5] drm/i915: s/intel_crtc/crtc/ in intel_crtc_init() Ville Syrjala 2019-11-07 14:24 ` [Intel-gfx] " Ville Syrjala 2019-11-07 14:24 ` Ville Syrjala 2019-12-10 2:06 ` [Intel-gfx] " Souza, Jose 2019-12-10 2:06 ` Souza, Jose 2019-11-07 14:24 ` [PATCH 3/5] drm/i915: Introduce intel_crtc_{alloc,free}() Ville Syrjala 2019-11-07 14:24 ` [Intel-gfx] [PATCH 3/5] drm/i915: Introduce intel_crtc_{alloc, free}() Ville Syrjala 2019-12-10 2:09 ` [PATCH 3/5] drm/i915: Introduce intel_crtc_{alloc,free}() Souza, Jose 2019-12-10 2:09 ` [Intel-gfx] [PATCH 3/5] drm/i915: Introduce intel_crtc_{alloc, free}() Souza, Jose 2019-11-07 14:24 ` [PATCH 4/5] drm/i915: Introduce intel_crtc_state_reset() Ville Syrjala 2019-11-07 14:24 ` [Intel-gfx] " Ville Syrjala 2019-12-10 2:12 ` Souza, Jose 2019-12-10 2:12 ` Souza, Jose 2019-11-07 14:24 ` Ville Syrjala [this message] 2019-11-07 14:24 ` [Intel-gfx] [PATCH 5/5] drm/i915: Introduce intel_plane_state_reset() Ville Syrjala 2019-12-10 2:12 ` Souza, Jose 2019-12-10 2:12 ` Souza, Jose 2019-11-07 17:38 ` [PATCH 1/5] drm: Add __drm_atomic_helper_crtc_state_reset() & co Daniel Vetter 2019-11-07 17:38 ` [Intel-gfx] " Daniel Vetter 2019-11-07 17:38 ` Daniel Vetter 2019-11-07 18:28 ` ✗ Fi.CI.BAT: failure for series starting with [1/5] " Patchwork 2019-11-07 18:28 ` [Intel-gfx] " Patchwork 2019-12-12 17:14 ` [Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/5] drm: Add __drm_atomic_helper_crtc_state_reset() & co. (rev2) Patchwork 2019-12-13 23:38 ` [Intel-gfx] [PATCH 1/5] drm: Add __drm_atomic_helper_crtc_state_reset() & co Lucas De Marchi 2019-12-13 23:38 ` Lucas De Marchi 2019-12-18 14:53 ` Ville Syrjälä 2019-12-18 14:53 ` Ville Syrjälä 2019-12-17 1:40 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for series starting with [1/5] drm: Add __drm_atomic_helper_crtc_state_reset() & co. (rev3) Patchwork 2019-12-17 11:46 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork 2019-12-17 18:10 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork 2019-12-17 18:33 ` Souza, Jose 2019-12-17 18:42 ` James Ausmus 2019-12-18 9:33 ` Vudum, Lakshminarayana 2019-12-18 8:10 ` [Intel-gfx] ✓ Fi.CI.IGT: success " 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=20191107142417.11107-5-ville.syrjala@linux.intel.com \ --to=ville.syrjala@linux.intel.com \ --cc=dri-devel@lists.freedesktop.org \ --cc=intel-gfx@lists.freedesktop.org \ /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: linkBe 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.