Skip to contentSkip to conversation

drm: Nuke drm_framebuffer->helper_private

PATCH In review Daniel Vetter 3 participants 3 messages Sep 10, 2015 – Sep 11, 2015

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

PATCH 1/1 drm: Nuke drm_framebuffer->helper_private

It's completely unused and there's really no reason for this:
- drm_framebuffer structures are invariant after creation, no need for helpers to manipulate them.
- drm_framebuffer structures should just be embedded (and that's what all the drivers do).

Stumbled over this since some folks are apparently concerned with the overhead of struct drm_framebuffer and this is an easy 8 byte saving.

More could be gained by ditching the legacy fields and recomputing stuff from the fourcc value. But that would require some drm-wide cocci and real justification.

---
 include/drm/drm_crtc.h | 2 --
 1 file changed, 2 deletions(-)
include/drm/drm_crtc.h +0 -2
index 75f49c1ef8bb..c0366e9152e2 100644
@@ -210,8 +210,6 @@ struct drm_framebuffer {
 	int flags;
 	uint32_t pixel_format; /* fourcc format */
 	struct list_head filp_head;
-	/* if you are using the helper */
-	void *helper_private;
 };
 
 struct drm_property_blob {
Signature · 6 lines
2.5.1

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v1 1/1
#1 lore raw

Hi

Quoted 13 lines · Daniel Vetter

It's completely unused and there's really no reason for this:
- drm_framebuffer structures are invariant after creation, no need for helpers to manipulate them.
- drm_framebuffer structures should just be embedded (and that's what all the drivers do).

Stumbled over this since some folks are apparently concerned with the overhead of struct drm_framebuffer and this is an easy 8 byte saving.

More could be gained by ditching the legacy fields and recomputing stuff from the fourcc value. But that would require some drm-wide cocci and real justification.

Quoted 5 lines
---
 include/drm/drm_crtc.h | 2 --
 1 file changed, 2 deletions(-)

Thanks
David

Quoted 16 lines
include/drm/drm_crtc.h +0 -3
index 75f49c1ef8bb..c0366e9152e2 100644
@@ -210,8 +210,6 @@ struct drm_framebuffer {
        int flags;
        uint32_t pixel_format; /* fourcc format */
        struct list_head filp_head;
-       /* if you are using the helper */
-       void *helper_private;
 };
 
 struct drm_property_blob {
--

2.5.1

Quoted 4 lines

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

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw
Quoted 16 lines · David Herrmann

Hi

Quoted 13 lines · Daniel Vetter

It's completely unused and there's really no reason for this:
- drm_framebuffer structures are invariant after creation, no need for helpers to manipulate them.
- drm_framebuffer structures should just be embedded (and that's what all the drivers do).

Stumbled over this since some folks are apparently concerned with the overhead of struct drm_framebuffer and this is an easy 8 byte saving.

More could be gained by ditching the legacy fields and recomputing stuff from the fourcc value. But that would require some drm-wide cocci and real justification.

Quoted 7 lines
Quoted 5 lines
---
 include/drm/drm_crtc.h | 2 --
 1 file changed, 2 deletions(-)

Thanks for the review, patch applied to drm-misc.
-Daniel

Quoted 24 lines

Thanks
David

Quoted 20 lines
include/drm/drm_crtc.h +0 -3
index 75f49c1ef8bb..c0366e9152e2 100644
@@ -210,8 +210,6 @@ struct drm_framebuffer {
        int flags;
        uint32_t pixel_format; /* fourcc format */
        struct list_head filp_head;
-       /* if you are using the helper */
-       void *helper_private;
 };
 
 struct drm_property_blob {
--

2.5.1

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

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx