Commit 537a1db9 authored by Thomas Zimmermann's avatar Thomas Zimmermann

drm/ast: Rename struct ast_cursor_plane to struct ast_plane

Rename the plane structure struct ast_cursor_plane to struct
ast_plane as it will be used for the primary plane as well. No
functional changes.
Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: default avatarJocelyn Falempe <jfalempe@redhat.com>
Tested-by: default avatarJocelyn Falempe <jfalempe@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221013112923.769-6-tzimmermann@suse.de
parent aa7c8865
...@@ -87,7 +87,7 @@ enum ast_tx_chip { ...@@ -87,7 +87,7 @@ enum ast_tx_chip {
#define AST_DRAM_8Gx16 8 #define AST_DRAM_8Gx16 8
/* /*
* Cursor plane * Hardware cursor
*/ */
#define AST_MAX_HWC_WIDTH 64 #define AST_MAX_HWC_WIDTH 64
...@@ -105,7 +105,11 @@ enum ast_tx_chip { ...@@ -105,7 +105,11 @@ enum ast_tx_chip {
#define AST_HWC_SIGNATURE_HOTSPOTX 0x14 #define AST_HWC_SIGNATURE_HOTSPOTX 0x14
#define AST_HWC_SIGNATURE_HOTSPOTY 0x18 #define AST_HWC_SIGNATURE_HOTSPOTY 0x18
struct ast_cursor_plane { /*
* Planes
*/
struct ast_plane {
struct drm_plane base; struct drm_plane base;
struct drm_gem_vram_object *gbo; struct drm_gem_vram_object *gbo;
...@@ -113,10 +117,9 @@ struct ast_cursor_plane { ...@@ -113,10 +117,9 @@ struct ast_cursor_plane {
u64 off; u64 off;
}; };
static inline struct ast_cursor_plane * static inline struct ast_plane *to_ast_plane(struct drm_plane *plane)
to_ast_cursor_plane(struct drm_plane *plane)
{ {
return container_of(plane, struct ast_cursor_plane, base); return container_of(plane, struct ast_plane, base);
} }
/* /*
...@@ -170,7 +173,7 @@ struct ast_private { ...@@ -170,7 +173,7 @@ struct ast_private {
uint32_t mclk; uint32_t mclk;
struct drm_plane primary_plane; struct drm_plane primary_plane;
struct ast_cursor_plane cursor_plane; struct ast_plane cursor_plane;
struct drm_crtc crtc; struct drm_crtc crtc;
struct { struct {
struct { struct {
......
...@@ -829,7 +829,7 @@ static void ...@@ -829,7 +829,7 @@ static void
ast_cursor_plane_helper_atomic_update(struct drm_plane *plane, ast_cursor_plane_helper_atomic_update(struct drm_plane *plane,
struct drm_atomic_state *state) struct drm_atomic_state *state)
{ {
struct ast_cursor_plane *ast_cursor_plane = to_ast_cursor_plane(plane); struct ast_plane *ast_plane = to_ast_plane(plane);
struct drm_plane_state *old_state = drm_atomic_get_old_plane_state(state, struct drm_plane_state *old_state = drm_atomic_get_old_plane_state(state,
plane); plane);
struct drm_plane_state *new_state = drm_atomic_get_new_plane_state(state, struct drm_plane_state *new_state = drm_atomic_get_new_plane_state(state,
...@@ -837,8 +837,8 @@ ast_cursor_plane_helper_atomic_update(struct drm_plane *plane, ...@@ -837,8 +837,8 @@ ast_cursor_plane_helper_atomic_update(struct drm_plane *plane,
struct drm_shadow_plane_state *shadow_plane_state = to_drm_shadow_plane_state(new_state); struct drm_shadow_plane_state *shadow_plane_state = to_drm_shadow_plane_state(new_state);
struct drm_framebuffer *fb = new_state->fb; struct drm_framebuffer *fb = new_state->fb;
struct ast_private *ast = to_ast_private(plane->dev); struct ast_private *ast = to_ast_private(plane->dev);
struct iosys_map dst_map = ast_cursor_plane->map; struct iosys_map dst_map = ast_plane->map;
u64 dst_off = ast_cursor_plane->off; u64 dst_off = ast_plane->off;
struct iosys_map src_map = shadow_plane_state->data[0]; struct iosys_map src_map = shadow_plane_state->data[0];
unsigned int offset_x, offset_y; unsigned int offset_x, offset_y;
u16 x, y; u16 x, y;
...@@ -910,9 +910,9 @@ static const struct drm_plane_helper_funcs ast_cursor_plane_helper_funcs = { ...@@ -910,9 +910,9 @@ static const struct drm_plane_helper_funcs ast_cursor_plane_helper_funcs = {
static void ast_cursor_plane_destroy(struct drm_plane *plane) static void ast_cursor_plane_destroy(struct drm_plane *plane)
{ {
struct ast_cursor_plane *ast_cursor_plane = to_ast_cursor_plane(plane); struct ast_plane *ast_plane = to_ast_plane(plane);
struct drm_gem_vram_object *gbo = ast_cursor_plane->gbo; struct drm_gem_vram_object *gbo = ast_plane->gbo;
struct iosys_map map = ast_cursor_plane->map; struct iosys_map map = ast_plane->map;
drm_gem_vram_vunmap(gbo, &map); drm_gem_vram_vunmap(gbo, &map);
drm_gem_vram_unpin(gbo); drm_gem_vram_unpin(gbo);
...@@ -931,8 +931,8 @@ static const struct drm_plane_funcs ast_cursor_plane_funcs = { ...@@ -931,8 +931,8 @@ static const struct drm_plane_funcs ast_cursor_plane_funcs = {
static int ast_cursor_plane_init(struct ast_private *ast) static int ast_cursor_plane_init(struct ast_private *ast)
{ {
struct drm_device *dev = &ast->base; struct drm_device *dev = &ast->base;
struct ast_cursor_plane *ast_cursor_plane = &ast->cursor_plane; struct ast_plane *ast_plane = &ast->cursor_plane;
struct drm_plane *cursor_plane = &ast_cursor_plane->base; struct drm_plane *cursor_plane = &ast_plane->base;
size_t size; size_t size;
struct drm_gem_vram_object *gbo; struct drm_gem_vram_object *gbo;
struct iosys_map map; struct iosys_map map;
...@@ -963,9 +963,9 @@ static int ast_cursor_plane_init(struct ast_private *ast) ...@@ -963,9 +963,9 @@ static int ast_cursor_plane_init(struct ast_private *ast)
goto err_drm_gem_vram_vunmap; goto err_drm_gem_vram_vunmap;
} }
ast_cursor_plane->gbo = gbo; ast_plane->gbo = gbo;
ast_cursor_plane->map = map; ast_plane->map = map;
ast_cursor_plane->off = off; ast_plane->off = off;
/* /*
* Create the cursor plane. The plane's destroy callback will release * Create the cursor plane. The plane's destroy callback will release
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment