Skip to content

Commit fc1d3e4

Browse files
mattropedanvet
authored andcommitted
drm: Allow drivers to register cursor planes with crtc
Universal plane support had placeholders for cursor planes, but didn't actually do anything with them. Save the cursor plane reference inside the crtc and update the cursor plane parameter from void* to drm_plane. Reviewed-by: Daniel Vetter <[email protected]> Signed-off-by: Matt Roper <[email protected]> Reviewed-by: Pallavi G<[email protected]> Acked-by: Dave Airlie <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
1 parent 17cfd91 commit fc1d3e4

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

drivers/gpu/drm/drm_crtc.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ DEFINE_WW_CLASS(crtc_ww_class);
727727
*/
728728
int drm_crtc_init_with_planes(struct drm_device *dev, struct drm_crtc *crtc,
729729
struct drm_plane *primary,
730-
void *cursor,
730+
struct drm_plane *cursor,
731731
const struct drm_crtc_funcs *funcs)
732732
{
733733
struct drm_mode_config *config = &dev->mode_config;
@@ -752,8 +752,11 @@ int drm_crtc_init_with_planes(struct drm_device *dev, struct drm_crtc *crtc,
752752
config->num_crtc++;
753753

754754
crtc->primary = primary;
755+
crtc->cursor = cursor;
755756
if (primary)
756757
primary->possible_crtcs = 1 << drm_crtc_index(crtc);
758+
if (cursor)
759+
cursor->possible_crtcs = 1 << drm_crtc_index(crtc);
757760

758761
out:
759762
drm_modeset_unlock_all(dev);

include/drm/drm_crtc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,7 @@ struct drm_prop_enum_list {
856856
extern int drm_crtc_init_with_planes(struct drm_device *dev,
857857
struct drm_crtc *crtc,
858858
struct drm_plane *primary,
859-
void *cursor,
859+
struct drm_plane *cursor,
860860
const struct drm_crtc_funcs *funcs);
861861
extern int drm_crtc_init(struct drm_device *dev,
862862
struct drm_crtc *crtc,

0 commit comments

Comments
 (0)