summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Brace <kevinbrace@gmx.com>2021-05-14 20:15:31 -0700
committerKevin Brace <kevinbrace@gmx.com>2021-05-14 20:15:31 -0700
commitc3588b84799e3ac2bad1e73b2b076816a3363a1c (patch)
treec570b36d4fc906ff0e5880c739383154d19716ab
parentdca26c46653aa06c97fadb8abb2390a31fe90073 (diff)
drm: Use state helper instead of the plane state pointer
Based on commit 37418bf (drm: Use state helper instead of the plane state pointer). Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
-rw-r--r--drivers/gpu/drm/openchrome/openchrome_crtc.c3
-rw-r--r--drivers/gpu/drm/openchrome/openchrome_cursor.c6
2 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/drm/openchrome/openchrome_crtc.c b/drivers/gpu/drm/openchrome/openchrome_crtc.c
index 44005587ab18..0ce9af620d01 100644
--- a/drivers/gpu/drm/openchrome/openchrome_crtc.c
+++ b/drivers/gpu/drm/openchrome/openchrome_crtc.c
@@ -1886,7 +1886,8 @@ static void openchrome_primary_atomic_disable(struct drm_plane *plane,
void openchrome_primary_atomic_update(struct drm_plane *plane,
struct drm_atomic_state *state)
{
- struct drm_plane_state *new_state = plane->state;
+ struct drm_plane_state *new_state =
+ drm_atomic_get_new_plane_state(state, plane);
struct drm_crtc *crtc = new_state->crtc;
struct drm_framebuffer *fb = new_state->fb;
uint32_t pitch = (new_state->crtc_y * fb->pitches[0]) +
diff --git a/drivers/gpu/drm/openchrome/openchrome_cursor.c b/drivers/gpu/drm/openchrome/openchrome_cursor.c
index dcd8eaab4c5c..ab870ede2035 100644
--- a/drivers/gpu/drm/openchrome/openchrome_cursor.c
+++ b/drivers/gpu/drm/openchrome/openchrome_cursor.c
@@ -357,7 +357,8 @@ exit:
static void openchrome_cursor_atomic_update(struct drm_plane *plane,
struct drm_atomic_state *state)
{
- struct drm_plane_state *new_state = plane->state;
+ struct drm_plane_state *new_state =
+ drm_atomic_get_new_plane_state(state, plane);
struct drm_plane_state *old_state =
drm_atomic_get_old_plane_state(state, plane);
struct drm_crtc *crtc = new_state->crtc;
@@ -383,7 +384,8 @@ static void openchrome_cursor_atomic_update(struct drm_plane *plane,
void openchrome_cursor_atomic_disable(struct drm_plane *plane,
struct drm_atomic_state *state)
{
- struct drm_plane_state *new_state = plane->state;
+ struct drm_plane_state *new_state =
+ drm_atomic_get_new_plane_state(state, plane);
struct drm_device *dev = plane->dev;
struct drm_crtc *crtc = new_state->crtc;