diff options
author | Thomas Zimmermann <tzimmermann@suse.de> | 2021-02-09 14:46:28 +0100 |
---|---|---|
committer | Thomas Zimmermann <tzimmermann@suse.de> | 2021-02-17 12:40:09 +0100 |
commit | a0ba992d1738af83b6d479721c0be3c4317b2df3 (patch) | |
tree | 1efc1188ac8213497bf9fae83ca59203fc221193 /drivers/gpu/drm/ast/ast_drv.h | |
parent | 718c22865fc0a9c821e21eacba46829516901374 (diff) | |
download | linux-a0ba992d1738af83b6d479721c0be3c4317b2df3.tar.bz2 |
drm/ast: Add cursor-plane data structure
Cursor state is currently located throughout struct ast_private. Having
struct ast_cursor_plane as dedicated data structure for cursors helps to
organize the modesetting code.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210209134632.12157-7-tzimmermann@suse.de
Diffstat (limited to 'drivers/gpu/drm/ast/ast_drv.h')
-rw-r--r-- | drivers/gpu/drm/ast/ast_drv.h | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/drivers/gpu/drm/ast/ast_drv.h b/drivers/gpu/drm/ast/ast_drv.h index 2761fa547c35..9eefd3f01f4c 100644 --- a/drivers/gpu/drm/ast/ast_drv.h +++ b/drivers/gpu/drm/ast/ast_drv.h @@ -81,6 +81,9 @@ enum ast_tx_chip { #define AST_DRAM_4Gx16 7 #define AST_DRAM_8Gx16 8 +/* + * Cursor plane + */ #define AST_MAX_HWC_WIDTH 64 #define AST_MAX_HWC_HEIGHT 64 @@ -99,6 +102,20 @@ enum ast_tx_chip { #define AST_HWC_SIGNATURE_HOTSPOTX 0x14 #define AST_HWC_SIGNATURE_HOTSPOTY 0x18 +struct ast_cursor_plane { + struct drm_plane base; +}; + +static inline struct ast_cursor_plane * +to_ast_cursor_plane(struct drm_plane *plane) +{ + return container_of(plane, struct ast_cursor_plane, base); +} + +/* + * Connector with i2c channel + */ + struct ast_i2c_chan { struct i2c_adapter adapter; struct drm_device *dev; @@ -116,6 +133,10 @@ to_ast_connector(struct drm_connector *connector) return container_of(connector, struct ast_connector, base); } +/* + * Device + */ + struct ast_private { struct drm_device base; @@ -136,7 +157,7 @@ struct ast_private { } cursor; struct drm_plane primary_plane; - struct drm_plane cursor_plane; + struct ast_cursor_plane cursor_plane; struct drm_crtc crtc; struct drm_encoder encoder; struct ast_connector connector; |