mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-23 19:25:25 +03:00
68 lines
2.5 KiB
Diff
68 lines
2.5 KiB
Diff
diff --git a/drivers/gpu/drm/mediatek/mtk_drm_plane.c b/drivers/gpu/drm/mediatek/mtk_drm_plane.c
|
|
old mode 100644
|
|
new mode 100755
|
|
index b5582dc..27ab307
|
|
--- a/drivers/gpu/drm/mediatek/mtk_drm_plane.c
|
|
+++ b/drivers/gpu/drm/mediatek/mtk_drm_plane.c
|
|
@@ -184,13 +184,11 @@
|
|
}
|
|
|
|
static void mtk_plane_atomic_update(struct drm_plane *plane,
|
|
- struct drm_atomic_state *state)
|
|
+ struct drm_atomic_state *old_state)
|
|
{
|
|
- struct drm_plane_state *new_state = drm_atomic_get_new_plane_state(state,
|
|
- plane);
|
|
- struct mtk_plane_state *mtk_plane_state = to_mtk_plane_state(new_state);
|
|
- struct drm_crtc *crtc = new_state->crtc;
|
|
- struct drm_framebuffer *fb = new_state->fb;
|
|
+ struct mtk_plane_state *state = to_mtk_plane_state(plane->state);
|
|
+ struct drm_crtc *crtc = plane->state->crtc;
|
|
+ struct drm_framebuffer *fb = plane->state->fb;
|
|
struct drm_gem_object *gem;
|
|
struct mtk_drm_gem_obj *mtk_gem;
|
|
unsigned int pitch, format;
|
|
@@ -199,8 +197,8 @@
|
|
if (!crtc || WARN_ON(!fb))
|
|
return;
|
|
|
|
- if (!new_state->visible) {
|
|
- mtk_plane_atomic_disable(plane, state);
|
|
+ if (!plane->state->visible) {
|
|
+ mtk_plane_atomic_disable(plane, old_state);
|
|
return;
|
|
}
|
|
|
|
@@ -210,20 +208,20 @@
|
|
pitch = fb->pitches[0];
|
|
format = fb->format->format;
|
|
|
|
- addr += (new_state->src.x1 >> 16) * fb->format->cpp[0];
|
|
- addr += (new_state->src.y1 >> 16) * pitch;
|
|
+ addr += (plane->state->src.x1 >> 16) * fb->format->cpp[0];
|
|
+ addr += (plane->state->src.y1 >> 16) * pitch;
|
|
|
|
- mtk_plane_state->pending.enable = true;
|
|
- mtk_plane_state->pending.pitch = pitch;
|
|
- mtk_plane_state->pending.format = format;
|
|
- mtk_plane_state->pending.addr = addr;
|
|
- mtk_plane_state->pending.x = new_state->dst.x1;
|
|
- mtk_plane_state->pending.y = new_state->dst.y1;
|
|
- mtk_plane_state->pending.width = drm_rect_width(&new_state->dst);
|
|
- mtk_plane_state->pending.height = drm_rect_height(&new_state->dst);
|
|
- mtk_plane_state->pending.rotation = new_state->rotation;
|
|
+ state->pending.enable = true;
|
|
+ state->pending.pitch = pitch;
|
|
+ state->pending.format = format;
|
|
+ state->pending.addr = addr;
|
|
+ state->pending.x = plane->state->dst.x1;
|
|
+ state->pending.y = plane->state->dst.y1;
|
|
+ state->pending.width = drm_rect_width(&plane->state->dst);
|
|
+ state->pending.height = drm_rect_height(&plane->state->dst);
|
|
+ state->pending.rotation = plane->state->rotation;
|
|
wmb(); /* Make sure the above parameters are set before update */
|
|
- mtk_plane_state->pending.dirty = true;
|
|
+ state->pending.dirty = true;
|
|
}
|
|
|
|
static const struct drm_plane_helper_funcs mtk_plane_helper_funcs = {
|