Skip to contentSkip to conversation

drm: Complete remove drm_mode_object dependency

PATCH In review Shayenne Moura 2 participants 3 messages Dec 18, 2018 – Dec 19, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 7/7 drm: Complete remove drm_mode_object dependency

This patch finalizes the KMS cleanup task dependency from drm_display_mode It removes the use of drm_mode_object from drm_display_mode struct and it removes the use of base.id and base.type.

---
 include/drm/drm_modes.h | 21 +++------------------
 1 file changed, 3 insertions(+), 18 deletions(-)
include/drm/drm_modes.h +3 -18
index baded6514456..9ecc1e835565 100644
@@ -136,8 +136,7 @@ enum drm_mode_status {
        .hdisplay = (hd), .hsync_start = (hss), .hsync_end = (hse), \
        .htotal = (ht), .hskew = (hsk), .vdisplay = (vd), \
        .vsync_start = (vss), .vsync_end = (vse), .vtotal = (vt), \
-       .vscan = (vs), .flags = (f), \
-       .base.type = DRM_MODE_OBJECT_MODE
+       .vscan = (vs), .flags = (f)
 
 #define CRTC_INTERLACE_HALVE_V (1 << 0) /* halve V values for interlacing */
 #define CRTC_STEREO_DOUBLE     (1 << 1) /* adjust timings for stereo modes */
@@ -213,20 +212,6 @@ struct drm_display_mode {
         */
        struct list_head head;
 
-       /**
-        * @base:
-        *
-        * A display mode is a normal modeset object, possibly including public
-        * userspace id.
-        *
-        * FIXME:
-        *
-        * This can probably be removed since the entire concept of userspace
-        * managing modes explicitly has never landed in upstream kernel mode
-        * setting support.
-        */
-       struct drm_mode_object base;
-
        /**
         * @name:
         *
@@ -429,14 +414,14 @@ struct drm_display_mode {
 /**
  * DRM_MODE_FMT - printf string for &struct drm_display_mode
  */
-#define DRM_MODE_FMT    "%d:\"%s\" %d %d %d %d %d %d %d %d %d %d 0x%x 0x%x"
+#define DRM_MODE_FMT    "\"%s\" %d %d %d %d %d %d %d %d %d %d 0x%x 0x%x"
 
 /**
  * DRM_MODE_ARG - printf arguments for &struct drm_display_mode
  * @m: display mode
  */
 #define DRM_MODE_ARG(m) \
-       (m)->base.id, (m)->name, (m)->vrefresh, (m)->clock, \
+       (m)->name, (m)->vrefresh, (m)->clock, \
        (m)->hdisplay, (m)->hsync_start, (m)->hsync_end, (m)->htotal, \
        (m)->vdisplay, (m)->vsync_start, (m)->vsync_end, (m)->vtotal, \
        (m)->type, (m)->flags
Signature · 6 lines
2.17.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v1 7/7
#1 lore raw
Quoted 5 lines · Shayenne Moura

This patch finalizes the KMS cleanup task dependency from drm_display_mode It removes the use of drm_mode_object from drm_display_mode struct and it removes the use of base.id and base.type.

I didn't yet compile-test all the drivers, but aside from that this looks all good.

Quoted 63 lines
---
 include/drm/drm_modes.h | 21 +++------------------
 1 file changed, 3 insertions(+), 18 deletions(-)
include/drm/drm_modes.h +3 -18
index baded6514456..9ecc1e835565 100644
@@ -136,8 +136,7 @@ enum drm_mode_status {
        .hdisplay = (hd), .hsync_start = (hss), .hsync_end = (hse), \
        .htotal = (ht), .hskew = (hsk), .vdisplay = (vd), \
        .vsync_start = (vss), .vsync_end = (vse), .vtotal = (vt), \
-       .vscan = (vs), .flags = (f), \
-       .base.type = DRM_MODE_OBJECT_MODE
+       .vscan = (vs), .flags = (f)
 
 #define CRTC_INTERLACE_HALVE_V (1 << 0) /* halve V values for interlacing */
 #define CRTC_STEREO_DOUBLE     (1 << 1) /* adjust timings for stereo modes */
@@ -213,20 +212,6 @@ struct drm_display_mode {
         */
        struct list_head head;
 
-       /**
-        * @base:
-        *
-        * A display mode is a normal modeset object, possibly including public
-        * userspace id.
-        *
-        * FIXME:
-        *
-        * This can probably be removed since the entire concept of userspace
-        * managing modes explicitly has never landed in upstream kernel mode
-        * setting support.
-        */
-       struct drm_mode_object base;
-
        /**
         * @name:
         *
@@ -429,14 +414,14 @@ struct drm_display_mode {
 /**
  * DRM_MODE_FMT - printf string for &struct drm_display_mode
  */
-#define DRM_MODE_FMT    "%d:\"%s\" %d %d %d %d %d %d %d %d %d %d 0x%x 0x%x"
+#define DRM_MODE_FMT    "\"%s\" %d %d %d %d %d %d %d %d %d %d 0x%x 0x%x"
 
 /**
  * DRM_MODE_ARG - printf arguments for &struct drm_display_mode
  * @m: display mode
  */
 #define DRM_MODE_ARG(m) \
-       (m)->base.id, (m)->name, (m)->vrefresh, (m)->clock, \
+       (m)->name, (m)->vrefresh, (m)->clock, \
        (m)->hdisplay, (m)->hsync_start, (m)->hsync_end, (m)->htotal, \
        (m)->vdisplay, (m)->vsync_start, (m)->vsync_end, (m)->vtotal, \
        (m)->type, (m)->flags
Signature · 6 lines
2.17.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
#2 lore raw
Quoted 10 lines · Daniel Vetter
Quoted 5 lines · Shayenne Moura

This patch finalizes the KMS cleanup task dependency from drm_display_mode It removes the use of drm_mode_object from drm_display_mode struct and it removes the use of base.id and base.type.

I didn't yet compile-test all the drivers, but aside from that this looks all good.

Thank you for your reviews! :)

Shayenne

Quoted 60 lines
Quoted 59 lines
---
 include/drm/drm_modes.h | 21 +++------------------
 1 file changed, 3 insertions(+), 18 deletions(-)
include/drm/drm_modes.h +3 -18
index baded6514456..9ecc1e835565 100644
@@ -136,8 +136,7 @@ enum drm_mode_status {
        .hdisplay = (hd), .hsync_start = (hss), .hsync_end = (hse), \
        .htotal = (ht), .hskew = (hsk), .vdisplay = (vd), \
        .vsync_start = (vss), .vsync_end = (vse), .vtotal = (vt), \
-       .vscan = (vs), .flags = (f), \
-       .base.type = DRM_MODE_OBJECT_MODE
+       .vscan = (vs), .flags = (f)
 
 #define CRTC_INTERLACE_HALVE_V (1 << 0) /* halve V values for interlacing */
 #define CRTC_STEREO_DOUBLE     (1 << 1) /* adjust timings for stereo modes */
@@ -213,20 +212,6 @@ struct drm_display_mode {
         */
        struct list_head head;
 
-       /**
-        * @base:
-        *
-        * A display mode is a normal modeset object, possibly including public
-        * userspace id.
-        *
-        * FIXME:
-        *
-        * This can probably be removed since the entire concept of userspace
-        * managing modes explicitly has never landed in upstream kernel mode
-        * setting support.
-        */
-       struct drm_mode_object base;
-
        /**
         * @name:
         *
@@ -429,14 +414,14 @@ struct drm_display_mode {
 /**
  * DRM_MODE_FMT - printf string for &struct drm_display_mode
  */
-#define DRM_MODE_FMT    "%d:\"%s\" %d %d %d %d %d %d %d %d %d %d 0x%x 0x%x"
+#define DRM_MODE_FMT    "\"%s\" %d %d %d %d %d %d %d %d %d %d 0x%x 0x%x"
 
 /**
  * DRM_MODE_ARG - printf arguments for &struct drm_display_mode
  * @m: display mode
  */
 #define DRM_MODE_ARG(m) \
-       (m)->base.id, (m)->name, (m)->vrefresh, (m)->clock, \
+       (m)->name, (m)->vrefresh, (m)->clock, \
        (m)->hdisplay, (m)->hsync_start, (m)->hsync_end, (m)->htotal, \
        (m)->vdisplay, (m)->vsync_start, (m)->vsync_end, (m)->vtotal, \
        (m)->type, (m)->flags
Signature · 1 line
2.17.1
Quoted 9 lines
Quoted 4 lines

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel