* [PATCH] drm/omap: move rotation property to drm core mode_config
@ 2014-08-06 8:40 Daniel Vetter
2014-09-30 11:42 ` Tomi Valkeinen
0 siblings, 1 reply; 6+ messages in thread
From: Daniel Vetter @ 2014-08-06 8:40 UTC (permalink / raw)
To: DRI Development; +Cc: Daniel Vetter, Tomi Valkeinen
This allows us to ditch the driver-private lastclose logic.
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Rob Clark <robdclark@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
--
Untested and atm only applies on top of drm-intel-nightly.
---
drivers/gpu/drm/omapdrm/omap_crtc.c | 4 ++--
drivers/gpu/drm/omapdrm/omap_drv.c | 9 ++-------
drivers/gpu/drm/omapdrm/omap_drv.h | 1 -
drivers/gpu/drm/omapdrm/omap_plane.c | 6 +++---
4 files changed, 7 insertions(+), 13 deletions(-)
diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c b/drivers/gpu/drm/omapdrm/omap_crtc.c
index 2d28dc337cfb..1240fa61b397 100644
--- a/drivers/gpu/drm/omapdrm/omap_crtc.c
+++ b/drivers/gpu/drm/omapdrm/omap_crtc.c
@@ -385,9 +385,9 @@ static int omap_crtc_set_property(struct drm_crtc *crtc,
struct drm_property *property, uint64_t val)
{
struct omap_crtc *omap_crtc = to_omap_crtc(crtc);
- struct omap_drm_private *priv = crtc->dev->dev_private;
+ struct drm_device *dev = crtc->dev;
- if (property == priv->rotation_prop) {
+ if (property == dev->mode_config.rotation_property) {
crtc->invert_dimensions =
!!(val & ((1LL << DRM_ROTATE_90) | (1LL << DRM_ROTATE_270)));
}
diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c
index 002b9721e85a..abfacca2e995 100644
--- a/drivers/gpu/drm/omapdrm/omap_drv.c
+++ b/drivers/gpu/drm/omapdrm/omap_drv.c
@@ -570,21 +570,16 @@ static void dev_lastclose(struct drm_device *dev)
DBG("lastclose: dev=%p", dev);
- if (priv->rotation_prop) {
+ if (dev->mode_config.rotation_property) {
/* need to restore default rotation state.. not sure
* if there is a cleaner way to restore properties to
* default state? Maybe a flag that properties should
* automatically be restored to default state on
* lastclose?
*/
- for (i = 0; i < priv->num_crtcs; i++) {
- drm_object_property_set_value(&priv->crtcs[i]->base,
- priv->rotation_prop, 0);
- }
-
for (i = 0; i < priv->num_planes; i++) {
drm_object_property_set_value(&priv->planes[i]->base,
- priv->rotation_prop, 0);
+ dev->mode_config.rotation_property, 0);
}
}
diff --git a/drivers/gpu/drm/omapdrm/omap_drv.h b/drivers/gpu/drm/omapdrm/omap_drv.h
index b08a450d1b5d..0443190e7af3 100644
--- a/drivers/gpu/drm/omapdrm/omap_drv.h
+++ b/drivers/gpu/drm/omapdrm/omap_drv.h
@@ -110,7 +110,6 @@ struct omap_drm_private {
bool has_dmm;
/* properties: */
- struct drm_property *rotation_prop;
struct drm_property *zorder_prop;
/* irq handling: */
diff --git a/drivers/gpu/drm/omapdrm/omap_plane.c b/drivers/gpu/drm/omapdrm/omap_plane.c
index 891a4dc608af..c1bcf631d04d 100644
--- a/drivers/gpu/drm/omapdrm/omap_plane.c
+++ b/drivers/gpu/drm/omapdrm/omap_plane.c
@@ -306,7 +306,7 @@ void omap_plane_install_properties(struct drm_plane *plane,
struct drm_property *prop;
if (priv->has_dmm) {
- prop = priv->rotation_prop;
+ prop = dev->mode_config.rotation_property;
if (!prop) {
prop = drm_mode_create_rotation_property(dev,
BIT(DRM_ROTATE_0) |
@@ -317,7 +317,7 @@ void omap_plane_install_properties(struct drm_plane *plane,
BIT(DRM_REFLECT_Y));
if (prop == NULL)
return;
- priv->rotation_prop = prop;
+ dev->mode_config.rotation_property = prop;
}
drm_object_attach_property(obj, prop, 0);
}
@@ -339,7 +339,7 @@ int omap_plane_set_property(struct drm_plane *plane,
struct omap_drm_private *priv = plane->dev->dev_private;
int ret = -EINVAL;
- if (property == priv->rotation_prop) {
+ if (property == dev->mode_config.rotation_property) {
DBG("%s: rotation: %02x", omap_plane->name, (uint32_t)val);
omap_plane->win.rotation = val;
ret = apply(plane);
--
2.0.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/omap: move rotation property to drm core mode_config
2014-08-06 8:40 [PATCH] drm/omap: move rotation property to drm core mode_config Daniel Vetter
@ 2014-09-30 11:42 ` Tomi Valkeinen
2014-09-30 11:49 ` Daniel Vetter
0 siblings, 1 reply; 6+ messages in thread
From: Tomi Valkeinen @ 2014-09-30 11:42 UTC (permalink / raw)
To: Daniel Vetter, DRI Development
[-- Attachment #1.1: Type: text/plain, Size: 412 bytes --]
On 06/08/14 11:40, Daniel Vetter wrote:
> This allows us to ditch the driver-private lastclose logic.
>
> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
> Cc: Rob Clark <robdclark@gmail.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>
> --
>
> Untested and atm only applies on top of drm-intel-nightly.
I could give this a try if you point me to a git tree with the patch.
Tomi
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/omap: move rotation property to drm core mode_config
2014-09-30 11:42 ` Tomi Valkeinen
@ 2014-09-30 11:49 ` Daniel Vetter
2014-09-30 11:52 ` Daniel Vetter
0 siblings, 1 reply; 6+ messages in thread
From: Daniel Vetter @ 2014-09-30 11:49 UTC (permalink / raw)
To: Tomi Valkeinen; +Cc: Daniel Vetter, DRI Development
On Tue, Sep 30, 2014 at 02:42:01PM +0300, Tomi Valkeinen wrote:
> On 06/08/14 11:40, Daniel Vetter wrote:
> > This allows us to ditch the driver-private lastclose logic.
> >
> > Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
> > Cc: Rob Clark <robdclark@gmail.com>
> > Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> >
> > --
> >
> > Untested and atm only applies on top of drm-intel-nightly.
>
> I could give this a try if you point me to a git tree with the patch.
I should apply on top of drm-next nowadays, prerequisites that went in
through drm-intel are all merged now. I guess you'll take care of this one
now?
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/omap: move rotation property to drm core mode_config
2014-09-30 11:49 ` Daniel Vetter
@ 2014-09-30 11:52 ` Daniel Vetter
2014-09-30 12:15 ` Tomi Valkeinen
0 siblings, 1 reply; 6+ messages in thread
From: Daniel Vetter @ 2014-09-30 11:52 UTC (permalink / raw)
To: Tomi Valkeinen; +Cc: Daniel Vetter, DRI Development
On Tue, Sep 30, 2014 at 01:49:20PM +0200, Daniel Vetter wrote:
> On Tue, Sep 30, 2014 at 02:42:01PM +0300, Tomi Valkeinen wrote:
> > On 06/08/14 11:40, Daniel Vetter wrote:
> > > This allows us to ditch the driver-private lastclose logic.
> > >
> > > Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
> > > Cc: Rob Clark <robdclark@gmail.com>
> > > Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> > >
> > > --
> > >
> > > Untested and atm only applies on top of drm-intel-nightly.
> >
> > I could give this a try if you point me to a git tree with the patch.
>
> I should apply on top of drm-next nowadays, prerequisites that went in
> through drm-intel are all merged now. I guess you'll take care of this one
> now?
btw if this works you can drop the entire if (rotation_property) hunk from
lastclose, since the fbdev helper now takes care of this itself:
commit 3a5f87c286515c54ff5c52c3e64d0c522b7570c0
Author: Thomas Wood <thomas.wood@intel.com>
Date: Wed Aug 20 14:45:00 2014 +0100
drm: fix plane rotation when restoring fbdev configuration
Cheers, Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/omap: move rotation property to drm core mode_config
2014-09-30 11:52 ` Daniel Vetter
@ 2014-09-30 12:15 ` Tomi Valkeinen
2014-09-30 13:11 ` Daniel Vetter
0 siblings, 1 reply; 6+ messages in thread
From: Tomi Valkeinen @ 2014-09-30 12:15 UTC (permalink / raw)
To: Daniel Vetter; +Cc: Daniel Vetter, DRI Development
[-- Attachment #1.1: Type: text/plain, Size: 6005 bytes --]
On 30/09/14 14:52, Daniel Vetter wrote:
> On Tue, Sep 30, 2014 at 01:49:20PM +0200, Daniel Vetter wrote:
>> On Tue, Sep 30, 2014 at 02:42:01PM +0300, Tomi Valkeinen wrote:
>>> On 06/08/14 11:40, Daniel Vetter wrote:
>>>> This allows us to ditch the driver-private lastclose logic.
>>>>
>>>> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
>>>> Cc: Rob Clark <robdclark@gmail.com>
>>>> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>>>>
>>>> --
>>>>
>>>> Untested and atm only applies on top of drm-intel-nightly.
>>>
>>> I could give this a try if you point me to a git tree with the patch.
>>
>> I should apply on top of drm-next nowadays, prerequisites that went in
>> through drm-intel are all merged now. I guess you'll take care of this one
>> now?
It didn't compile, but it was trivial to fix. And yes, I can pick it to my
omapdrm patches, which I guess will be delayed until 3.19.
> btw if this works you can drop the entire if (rotation_property) hunk from
> lastclose, since the fbdev helper now takes care of this itself:
>
> commit 3a5f87c286515c54ff5c52c3e64d0c522b7570c0
> Author: Thomas Wood <thomas.wood@intel.com>
> Date: Wed Aug 20 14:45:00 2014 +0100
>
> drm: fix plane rotation when restoring fbdev configuration
I updated the patch, with the compile fix and removal of the lastclose stuff.
Seems to work fine with a quick test: I exit X (after fiddling with xrandr
rotation in there), and I see the rotation property restored to the default
value.
Tomi
From afb37e165010fc5f3db82efdec9b883fb578deac Mon Sep 17 00:00:00 2001
From: Daniel Vetter <daniel.vetter@ffwll.ch>
Date: Wed, 6 Aug 2014 10:40:24 +0200
Subject: [PATCH] drm/omap: move rotation property to drm core mode_config
Move rotation property to drm core mode_config. This allows us to ditch
the driver-private lastclose logic.
Cc: Rob Clark <robdclark@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/gpu/drm/omapdrm/omap_crtc.c | 4 ++--
drivers/gpu/drm/omapdrm/omap_drv.c | 20 --------------------
drivers/gpu/drm/omapdrm/omap_drv.h | 1 -
drivers/gpu/drm/omapdrm/omap_plane.c | 7 ++++---
4 files changed, 6 insertions(+), 26 deletions(-)
diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c b/drivers/gpu/drm/omapdrm/omap_crtc.c
index 2d28dc337cfb..1240fa61b397 100644
--- a/drivers/gpu/drm/omapdrm/omap_crtc.c
+++ b/drivers/gpu/drm/omapdrm/omap_crtc.c
@@ -385,9 +385,9 @@ static int omap_crtc_set_property(struct drm_crtc *crtc,
struct drm_property *property, uint64_t val)
{
struct omap_crtc *omap_crtc = to_omap_crtc(crtc);
- struct omap_drm_private *priv = crtc->dev->dev_private;
+ struct drm_device *dev = crtc->dev;
- if (property == priv->rotation_prop) {
+ if (property == dev->mode_config.rotation_property) {
crtc->invert_dimensions =
!!(val & ((1LL << DRM_ROTATE_90) | (1LL << DRM_ROTATE_270)));
}
diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c
index 862ba03c236c..282f5ec4f1a2 100644
--- a/drivers/gpu/drm/omapdrm/omap_drv.c
+++ b/drivers/gpu/drm/omapdrm/omap_drv.c
@@ -560,8 +560,6 @@ static int dev_open(struct drm_device *dev, struct drm_file *file)
*/
static void dev_lastclose(struct drm_device *dev)
{
- int i;
-
/* we don't support vga-switcheroo.. so just make sure the fbdev
* mode is active
*/
@@ -570,24 +568,6 @@ static void dev_lastclose(struct drm_device *dev)
DBG("lastclose: dev=%p", dev);
- if (priv->rotation_prop) {
- /* need to restore default rotation state.. not sure
- * if there is a cleaner way to restore properties to
- * default state? Maybe a flag that properties should
- * automatically be restored to default state on
- * lastclose?
- */
- for (i = 0; i < priv->num_crtcs; i++) {
- drm_object_property_set_value(&priv->crtcs[i]->base,
- priv->rotation_prop, 0);
- }
-
- for (i = 0; i < priv->num_planes; i++) {
- drm_object_property_set_value(&priv->planes[i]->base,
- priv->rotation_prop, 0);
- }
- }
-
ret = drm_fb_helper_restore_fbdev_mode_unlocked(priv->fbdev);
if (ret)
DBG("failed to restore crtc mode");
diff --git a/drivers/gpu/drm/omapdrm/omap_drv.h b/drivers/gpu/drm/omapdrm/omap_drv.h
index 60e47b33c801..aa596504e662 100644
--- a/drivers/gpu/drm/omapdrm/omap_drv.h
+++ b/drivers/gpu/drm/omapdrm/omap_drv.h
@@ -111,7 +111,6 @@ struct omap_drm_private {
bool has_dmm;
/* properties: */
- struct drm_property *rotation_prop;
struct drm_property *zorder_prop;
/* irq handling: */
diff --git a/drivers/gpu/drm/omapdrm/omap_plane.c b/drivers/gpu/drm/omapdrm/omap_plane.c
index 891a4dc608af..3b5fad2a359c 100644
--- a/drivers/gpu/drm/omapdrm/omap_plane.c
+++ b/drivers/gpu/drm/omapdrm/omap_plane.c
@@ -306,7 +306,7 @@ void omap_plane_install_properties(struct drm_plane *plane,
struct drm_property *prop;
if (priv->has_dmm) {
- prop = priv->rotation_prop;
+ prop = dev->mode_config.rotation_property;
if (!prop) {
prop = drm_mode_create_rotation_property(dev,
BIT(DRM_ROTATE_0) |
@@ -317,7 +317,7 @@ void omap_plane_install_properties(struct drm_plane *plane,
BIT(DRM_REFLECT_Y));
if (prop == NULL)
return;
- priv->rotation_prop = prop;
+ dev->mode_config.rotation_property = prop;
}
drm_object_attach_property(obj, prop, 0);
}
@@ -337,9 +337,10 @@ int omap_plane_set_property(struct drm_plane *plane,
{
struct omap_plane *omap_plane = to_omap_plane(plane);
struct omap_drm_private *priv = plane->dev->dev_private;
+ struct drm_device *dev = omap_plane->base.dev;
int ret = -EINVAL;
- if (property == priv->rotation_prop) {
+ if (property == dev->mode_config.rotation_property) {
DBG("%s: rotation: %02x", omap_plane->name, (uint32_t)val);
omap_plane->win.rotation = val;
ret = apply(plane);
--
2.1.1
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/omap: move rotation property to drm core mode_config
2014-09-30 12:15 ` Tomi Valkeinen
@ 2014-09-30 13:11 ` Daniel Vetter
0 siblings, 0 replies; 6+ messages in thread
From: Daniel Vetter @ 2014-09-30 13:11 UTC (permalink / raw)
To: Tomi Valkeinen; +Cc: Daniel Vetter, DRI Development
On Tue, Sep 30, 2014 at 03:15:07PM +0300, Tomi Valkeinen wrote:
> On 30/09/14 14:52, Daniel Vetter wrote:
> > On Tue, Sep 30, 2014 at 01:49:20PM +0200, Daniel Vetter wrote:
> >> On Tue, Sep 30, 2014 at 02:42:01PM +0300, Tomi Valkeinen wrote:
> >>> On 06/08/14 11:40, Daniel Vetter wrote:
> >>>> This allows us to ditch the driver-private lastclose logic.
> >>>>
> >>>> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
> >>>> Cc: Rob Clark <robdclark@gmail.com>
> >>>> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> >>>>
> >>>> --
> >>>>
> >>>> Untested and atm only applies on top of drm-intel-nightly.
> >>>
> >>> I could give this a try if you point me to a git tree with the patch.
> >>
> >> I should apply on top of drm-next nowadays, prerequisites that went in
> >> through drm-intel are all merged now. I guess you'll take care of this one
> >> now?
>
> It didn't compile, but it was trivial to fix. And yes, I can pick it to my
> omapdrm patches, which I guess will be delayed until 3.19.
>
> > btw if this works you can drop the entire if (rotation_property) hunk from
> > lastclose, since the fbdev helper now takes care of this itself:
> >
> > commit 3a5f87c286515c54ff5c52c3e64d0c522b7570c0
> > Author: Thomas Wood <thomas.wood@intel.com>
> > Date: Wed Aug 20 14:45:00 2014 +0100
> >
> > drm: fix plane rotation when restoring fbdev configuration
>
> I updated the patch, with the compile fix and removal of the lastclose stuff.
> Seems to work fine with a quick test: I exit X (after fiddling with xrandr
> rotation in there), and I see the rotation property restored to the default
> value.
Yeah, lgtm. Thanks for taking care of this.
-Daniel
>
> Tomi
>
> From afb37e165010fc5f3db82efdec9b883fb578deac Mon Sep 17 00:00:00 2001
> From: Daniel Vetter <daniel.vetter@ffwll.ch>
> Date: Wed, 6 Aug 2014 10:40:24 +0200
> Subject: [PATCH] drm/omap: move rotation property to drm core mode_config
>
> Move rotation property to drm core mode_config. This allows us to ditch
> the driver-private lastclose logic.
>
> Cc: Rob Clark <robdclark@gmail.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
> ---
> drivers/gpu/drm/omapdrm/omap_crtc.c | 4 ++--
> drivers/gpu/drm/omapdrm/omap_drv.c | 20 --------------------
> drivers/gpu/drm/omapdrm/omap_drv.h | 1 -
> drivers/gpu/drm/omapdrm/omap_plane.c | 7 ++++---
> 4 files changed, 6 insertions(+), 26 deletions(-)
>
> diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c b/drivers/gpu/drm/omapdrm/omap_crtc.c
> index 2d28dc337cfb..1240fa61b397 100644
> --- a/drivers/gpu/drm/omapdrm/omap_crtc.c
> +++ b/drivers/gpu/drm/omapdrm/omap_crtc.c
> @@ -385,9 +385,9 @@ static int omap_crtc_set_property(struct drm_crtc *crtc,
> struct drm_property *property, uint64_t val)
> {
> struct omap_crtc *omap_crtc = to_omap_crtc(crtc);
> - struct omap_drm_private *priv = crtc->dev->dev_private;
> + struct drm_device *dev = crtc->dev;
>
> - if (property == priv->rotation_prop) {
> + if (property == dev->mode_config.rotation_property) {
> crtc->invert_dimensions =
> !!(val & ((1LL << DRM_ROTATE_90) | (1LL << DRM_ROTATE_270)));
> }
> diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c
> index 862ba03c236c..282f5ec4f1a2 100644
> --- a/drivers/gpu/drm/omapdrm/omap_drv.c
> +++ b/drivers/gpu/drm/omapdrm/omap_drv.c
> @@ -560,8 +560,6 @@ static int dev_open(struct drm_device *dev, struct drm_file *file)
> */
> static void dev_lastclose(struct drm_device *dev)
> {
> - int i;
> -
> /* we don't support vga-switcheroo.. so just make sure the fbdev
> * mode is active
> */
> @@ -570,24 +568,6 @@ static void dev_lastclose(struct drm_device *dev)
>
> DBG("lastclose: dev=%p", dev);
>
> - if (priv->rotation_prop) {
> - /* need to restore default rotation state.. not sure
> - * if there is a cleaner way to restore properties to
> - * default state? Maybe a flag that properties should
> - * automatically be restored to default state on
> - * lastclose?
> - */
> - for (i = 0; i < priv->num_crtcs; i++) {
> - drm_object_property_set_value(&priv->crtcs[i]->base,
> - priv->rotation_prop, 0);
> - }
> -
> - for (i = 0; i < priv->num_planes; i++) {
> - drm_object_property_set_value(&priv->planes[i]->base,
> - priv->rotation_prop, 0);
> - }
> - }
> -
> ret = drm_fb_helper_restore_fbdev_mode_unlocked(priv->fbdev);
> if (ret)
> DBG("failed to restore crtc mode");
> diff --git a/drivers/gpu/drm/omapdrm/omap_drv.h b/drivers/gpu/drm/omapdrm/omap_drv.h
> index 60e47b33c801..aa596504e662 100644
> --- a/drivers/gpu/drm/omapdrm/omap_drv.h
> +++ b/drivers/gpu/drm/omapdrm/omap_drv.h
> @@ -111,7 +111,6 @@ struct omap_drm_private {
> bool has_dmm;
>
> /* properties: */
> - struct drm_property *rotation_prop;
> struct drm_property *zorder_prop;
>
> /* irq handling: */
> diff --git a/drivers/gpu/drm/omapdrm/omap_plane.c b/drivers/gpu/drm/omapdrm/omap_plane.c
> index 891a4dc608af..3b5fad2a359c 100644
> --- a/drivers/gpu/drm/omapdrm/omap_plane.c
> +++ b/drivers/gpu/drm/omapdrm/omap_plane.c
> @@ -306,7 +306,7 @@ void omap_plane_install_properties(struct drm_plane *plane,
> struct drm_property *prop;
>
> if (priv->has_dmm) {
> - prop = priv->rotation_prop;
> + prop = dev->mode_config.rotation_property;
> if (!prop) {
> prop = drm_mode_create_rotation_property(dev,
> BIT(DRM_ROTATE_0) |
> @@ -317,7 +317,7 @@ void omap_plane_install_properties(struct drm_plane *plane,
> BIT(DRM_REFLECT_Y));
> if (prop == NULL)
> return;
> - priv->rotation_prop = prop;
> + dev->mode_config.rotation_property = prop;
> }
> drm_object_attach_property(obj, prop, 0);
> }
> @@ -337,9 +337,10 @@ int omap_plane_set_property(struct drm_plane *plane,
> {
> struct omap_plane *omap_plane = to_omap_plane(plane);
> struct omap_drm_private *priv = plane->dev->dev_private;
> + struct drm_device *dev = omap_plane->base.dev;
> int ret = -EINVAL;
>
> - if (property == priv->rotation_prop) {
> + if (property == dev->mode_config.rotation_property) {
> DBG("%s: rotation: %02x", omap_plane->name, (uint32_t)val);
> omap_plane->win.rotation = val;
> ret = apply(plane);
> --
> 2.1.1
>
>
>
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-09-30 13:11 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-06 8:40 [PATCH] drm/omap: move rotation property to drm core mode_config Daniel Vetter
2014-09-30 11:42 ` Tomi Valkeinen
2014-09-30 11:49 ` Daniel Vetter
2014-09-30 11:52 ` Daniel Vetter
2014-09-30 12:15 ` Tomi Valkeinen
2014-09-30 13:11 ` Daniel Vetter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.