diff options
| author | Ville Syrjälä <[email protected]> | 2016-09-26 16:30:52 +0000 |
|---|---|---|
| committer | Daniel Vetter <[email protected]> | 2016-10-21 16:25:47 +0000 |
| commit | 0da88db14034e8b309f1c4188123ca1a02f4b354 (patch) | |
| tree | 51a5237359da11038d16f735f60da1f6218aecdd /drivers/gpu/drm/omapdrm/omap_crtc.c | |
| parent | drm/omap: Set rotation property initial value to BIT(DRM_ROTATE_0) insted of 0 (diff) | |
| download | kernel-0da88db14034e8b309f1c4188123ca1a02f4b354.tar.gz kernel-0da88db14034e8b309f1c4188123ca1a02f4b354.zip | |
drm/omap: Use per-plane rotation property
The global mode_config.rotation_property is going away, switch over to
per-plane rotation_property.
Not sure I got the annoying crtc rotation_property handling right.
Might work, or migth not.
v2: Drop the BIT()
Don't create rotation property twice for each primary plane
Cc: Tomi Valkeinen <[email protected]>
Cc: Rob Clark <[email protected]>
Signed-off-by: Ville Syrjälä <[email protected]>
Reviewed-by: Tomi Valkeinen <[email protected]>
[danvet: Add comment per discussion between Tomi&Ville.]
Signed-off-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_crtc.c')
| -rw-r--r-- | drivers/gpu/drm/omapdrm/omap_crtc.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c b/drivers/gpu/drm/omapdrm/omap_crtc.c index 180f644e861e..16c691dbc372 100644 --- a/drivers/gpu/drm/omapdrm/omap_crtc.c +++ b/drivers/gpu/drm/omapdrm/omap_crtc.c @@ -438,13 +438,14 @@ static void omap_crtc_atomic_flush(struct drm_crtc *crtc, } } -static bool omap_crtc_is_plane_prop(struct drm_device *dev, +static bool omap_crtc_is_plane_prop(struct drm_crtc *crtc, struct drm_property *property) { + struct drm_device *dev = crtc->dev; struct omap_drm_private *priv = dev->dev_private; return property == priv->zorder_prop || - property == dev->mode_config.rotation_property; + property == crtc->primary->rotation_property; } static int omap_crtc_atomic_set_property(struct drm_crtc *crtc, @@ -452,9 +453,7 @@ static int omap_crtc_atomic_set_property(struct drm_crtc *crtc, struct drm_property *property, uint64_t val) { - struct drm_device *dev = crtc->dev; - - if (omap_crtc_is_plane_prop(dev, property)) { + if (omap_crtc_is_plane_prop(crtc, property)) { struct drm_plane_state *plane_state; struct drm_plane *plane = crtc->primary; @@ -479,9 +478,7 @@ static int omap_crtc_atomic_get_property(struct drm_crtc *crtc, struct drm_property *property, uint64_t *val) { - struct drm_device *dev = crtc->dev; - - if (omap_crtc_is_plane_prop(dev, property)) { + if (omap_crtc_is_plane_prop(crtc, property)) { /* * Delegate property get to the primary plane. The * drm_atomic_plane_get_property() function isn't exported, but |
