A gentle scrub
Subsystems (2)
A small pass on drm headers to remove some stale prototypes/functions/defines and to make static a few functions.
drivers/gpu/drm/drm_crtc.c | 38 +++---------------------------------- drivers/gpu/drm/drm_fb_cma_helper.c | 5 ++--- drivers/gpu/drm/drm_modes.c | 21 -------------------- drivers/gpu/drm/drm_platform.c | 7 +++---- include/drm/drmP.h | 8 -------- include/drm/drm_crtc.h | 17 ----------------- include/drm/drm_fb_cma_helper.h | 1 - include/drm/drm_pciids.h | 30 ----------------------------- 8 files changed, 8 insertions(+), 119 deletions(-)
Signature · 1 line
Damien
PATCH 1/8 drm: Remove stale prototypes
A few prototypes have been left in the headers, their function friends long gone.
--- include/drm/drmP.h | 5 ----- include/drm/drm_crtc.h | 11 ----------- 2 files changed, 16 deletions(-)
include/drm/drmP.h +0 -5
@@ -1371,7 +1371,6 @@ extern int drm_irq_uninstall(struct drm_device *dev);extern int drm_vblank_init (struct drm_device *dev,int num_crtcs);extern int drm_wait_vblank (struct drm_device *dev,void *data,struct drm_file *filp); -extern int drm_vblank_wait (struct drm_device *dev,unsigned int *vbl_seq);extern u32 drm_vblank_count (struct drm_device *dev,int crtc);extern u32 drm_vblank_count_and_time (struct drm_device *dev,int crtc,struct timeval *vblanktime);
@@ -1491,10 +1490,6 @@ void drm_prime_destroy_file_private(struct drm_prime_file_private *prime_fpriv);int drm_prime_lookup_buf_handle (struct drm_prime_file_private *prime_fpriv,struct dma_buf *dma_buf,uint32_t *handle);void drm_prime_remove_buf_handle (struct drm_prime_file_private *prime_fpriv,struct dma_buf *dma_buf); -int drm_prime_add_dma_buf (struct drm_device *dev,struct drm_gem_object *obj); -int drm_prime_lookup_obj (struct drm_device *dev,struct dma_buf *buf, -struct drm_gem_object **obj); -#if DRM_DEBUG_CODE extern int drm_vma_info (struct seq_file *m,void *data);#endif
include/drm/drm_crtc.h +0 -11
@@ -948,9 +948,6 @@ extern int drm_object_property_set_value(struct drm_mode_object *obj,extern int drm_object_property_get_value (struct drm_mode_object *obj,struct drm_property *property,uint64_t *value); -extern struct drm_display_mode *drm_crtc_mode_create (struct drm_device *dev); -extern void drm_framebuffer_set_object (struct drm_device *dev, -unsigned long handle);extern int drm_framebuffer_init (struct drm_device *dev,struct drm_framebuffer *fb,const struct drm_framebuffer_funcs *funcs);
@@ -961,10 +958,6 @@ extern void drm_framebuffer_reference(struct drm_framebuffer *fb);extern void drm_framebuffer_remove (struct drm_framebuffer *fb);extern void drm_framebuffer_cleanup (struct drm_framebuffer *fb);extern void drm_framebuffer_unregister_private (struct drm_framebuffer *fb); -extern int drmfb_probe (struct drm_device *dev,struct drm_crtc *crtc); -extern int drmfb_remove (struct drm_device *dev,struct drm_framebuffer *fb); -extern void drm_crtc_probe_connector_modes (struct drm_device *dev,int maxX,int maxY); -extern bool drm_crtc_in_use (struct drm_crtc *crtc); extern void drm_object_attach_property(struct drm_mode_object *obj, struct drm_property *property,
@@ -1039,10 +1032,6 @@ extern int drm_mode_getblob_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv);extern int drm_mode_connector_property_set_ioctl (struct drm_device *dev,void *data,struct drm_file *file_priv); -extern int drm_mode_hotplug_ioctl (struct drm_device *dev, -void *data,struct drm_file *file_priv); -extern int drm_mode_replacefb (struct drm_device *dev, -void *data,struct drm_file *file_priv);extern int drm_mode_getencoder (struct drm_device *dev,void *data,struct drm_file *file_priv); extern int drm_mode_gamma_get_ioctl(struct drm_device *dev,
Signature · 1 line
1.8.3.1
PATCH 2/8 drm: Remove drm_mode_create_dithering_property()
In reply to Damien LespiauThis was last used by nouveau, replaced by a driver-specific property in:
commit de69185573586302ada2e59ba41835df36986277
Author: Ben Skeggs <[email protected]>
Date: Mon Oct 17 12:23:41 2011 +1000
drm/nouveau: improve dithering properties, and implement proper auto mode
--- drivers/gpu/drm/drm_crtc.c | 31 ------------------------------- include/drm/drm_crtc.h | 1 - 2 files changed, 32 deletions(-)
drivers/gpu/drm/drm_crtc.c +0 -31
@@ -125,13 +125,6 @@ static const struct drm_prop_enum_list drm_scaling_mode_enum_list[] = { DRM_MODE_SCALE_ASPECT, "Full aspect" }, }; -static const struct drm_prop_enum_list drm_dithering_mode_enum_list[] = -{ - {DRM_MODE_DITHERING_OFF ,"Off" }, - {DRM_MODE_DITHERING_ON ,"On" }, - {DRM_MODE_DITHERING_AUTO ,"Automatic" }, -}; -/* * Non-global properties, but "required" for certain connectors. */
@@ -1161,30 +1154,6 @@ int drm_mode_create_scaling_mode_property(struct drm_device *dev)EXPORT_SYMBOL (drm_mode_create_scaling_mode_property);/** -* drm_mode_create_dithering_property - create dithering property -* @dev: DRM device -* -* Called by a driver the first time it's needed, must be attached to desired -* connectors. -*/ -int drm_mode_create_dithering_property (struct drm_device *dev) -{ -struct drm_property *dithering_mode; - -if (dev->mode_config.dithering_mode_property) -return 0 ; - - dithering_mode = -drm_property_create_enum (dev,0 ,"dithering" , - drm_dithering_mode_enum_list, -ARRAY_SIZE (drm_dithering_mode_enum_list)); - dev->mode_config.dithering_mode_property = dithering_mode; - -return 0 ; -} -EXPORT_SYMBOL (drm_mode_create_dithering_property); - -/** * drm_mode_create_dirty_property - create dirty property * @dev: DRM device *
include/drm/drm_crtc.h +0 -1
@@ -982,7 +982,6 @@ extern int drm_mode_create_dvi_i_properties(struct drm_device *dev);extern int drm_mode_create_tv_properties (struct drm_device *dev,int num_formats,char *formats[]);extern int drm_mode_create_scaling_mode_property (struct drm_device *dev); -extern int drm_mode_create_dithering_property (struct drm_device *dev);extern int drm_mode_create_dirty_info_property (struct drm_device *dev);extern const char *drm_get_encoder_name (const struct drm_encoder *encoder);
Signature · 1 line
1.8.3.1
PATCH 3/8 drm: Remove drm_mode_list_concat()
In reply to Damien LespiauThe last user was removed in
commit 575dc34ee0de867ba83abf25998e0963bff451fa
Author: Dave Airlie <[email protected]>
Date: Mon Sep 7 18:43:26 2009 +1000
drm/kms: remove old std mode fallback code.
The new code adds modes in the helper, which makes more sense I disliked the non-driver code adding modes.
--- drivers/gpu/drm/drm_modes.c | 21 --------------------- include/drm/drm_crtc.h | 2 -- 2 files changed, 23 deletions(-)
drivers/gpu/drm/drm_modes.c +0 -21
@@ -596,27 +596,6 @@ void drm_mode_set_name(struct drm_display_mode *mode)EXPORT_SYMBOL (drm_mode_set_name);/** -* drm_mode_list_concat - move modes from one list to another -* @head: source list -* @new: dst list -* -* LOCKING: -* Caller must ensure both lists are locked. -* -* Move all the modes from @head to @new. -*/ -void drm_mode_list_concat (struct list_head *head,struct list_head *new) -{ - -struct list_head *entry, *tmp; - -list_for_each_safe (entry, tmp, head) { -list_move_tail (entry, new); - } -} -EXPORT_SYMBOL (drm_mode_list_concat); - -/** * drm_mode_width - get the width of a mode * @mode: mode *
include/drm/drm_crtc.h +0 -2
@@ -927,8 +927,6 @@ extern int drm_mode_height(const struct drm_display_mode *mode);/* for us by fb module */ extern struct drm_display_mode *drm_mode_create (struct drm_device *dev);extern void drm_mode_destroy (struct drm_device *dev,struct drm_display_mode *mode); -extern void drm_mode_list_concat (struct list_head *head, -struct list_head *new);extern void drm_mode_validate_size (struct drm_device *dev,struct list_head *mode_list,int maxX,int maxY,int maxPitch);
Signature · 1 line
1.8.3.1
PATCH 4/8 drm: Make drm_mode_remove() static
In reply to Damien LespiauIt's only used in drm_crtc.c.
--- drivers/gpu/drm/drm_crtc.c | 7 +++---- include/drm/drm_crtc.h | 1 - 2 files changed, 3 insertions(+), 5 deletions(-)
drivers/gpu/drm/drm_crtc.c +3 -4
@@ -686,20 +686,19 @@ void drm_mode_probed_add(struct drm_connector *connector, }EXPORT_SYMBOL (drm_mode_probed_add); -/** +/* * drm_mode_remove - remove and free a mode * @connector: connector list to modify * @mode: mode to remove * * Remove @mode from @connector's mode list, then free it. */ -void drm_mode_remove (struct drm_connector *connector, -struct drm_display_mode *mode) +static void drm_mode_remove (struct drm_connector *connector, +struct drm_display_mode *mode) {list_del (&mode->head);drm_mode_destroy (connector->dev, mode); } -EXPORT_SYMBOL (drm_mode_remove);/** * drm_connector_init - Init a preallocated connector
include/drm/drm_crtc.h +0 -1
@@ -910,7 +910,6 @@ extern struct edid *drm_get_edid(struct drm_connector *connector, struct i2c_adapter *adapter);extern int drm_add_edid_modes (struct drm_connector *connector,struct edid *edid);extern void drm_mode_probed_add (struct drm_connector *connector,struct drm_display_mode *mode); -extern void drm_mode_remove (struct drm_connector *connector,struct drm_display_mode *mode);extern void drm_mode_copy (struct drm_display_mode *dst,const struct drm_display_mode *src);extern struct drm_display_mode *drm_mode_duplicate (struct drm_device *dev,const struct drm_display_mode *mode);
Signature · 1 line
1.8.3.1
PATCH 5/8 drm: Remove 2 unused defines
In reply to Damien LespiauThese were introduced in the very first DRM commit:
commit f453ba0460742ad027ae0c4c7d61e62817b3e7ef
Author: Dave Airlie <[email protected]>
Date: Fri Nov 7 14:05:41 2008 -0800
DRM: add mode setting support
Add mode setting support to the DRM layer.
But are unused.
--- include/drm/drm_crtc.h | 2 -- 1 file changed, 2 deletions(-)
include/drm/drm_crtc.h +0 -2
@@ -494,8 +494,6 @@ struct drm_encoder_funcs {void (*destroy)(struct drm_encoder *encoder); }; -#define DRM_CONNECTOR_MAX_UMODES 16 -#define DRM_CONNECTOR_LEN 32#define DRM_CONNECTOR_MAX_ENCODER 3/**
Signature · 1 line
1.8.3.1
PATCH 6/8 drm: Make drm_fb_cma_describe() static
In reply to Damien LespiauThis function is only used in drm_fb_cma_helper.c.
--- drivers/gpu/drm/drm_fb_cma_helper.c | 5 ++--- include/drm/drm_fb_cma_helper.h | 1 - 2 files changed, 2 insertions(+), 4 deletions(-)
drivers/gpu/drm/drm_fb_cma_helper.c +2 -3
@@ -181,11 +181,11 @@ struct drm_gem_cma_object *drm_fb_cma_get_gem_obj(struct drm_framebuffer *fb,EXPORT_SYMBOL_GPL (drm_fb_cma_get_gem_obj);#ifdef CONFIG_DEBUG_FS -/** +/* * drm_fb_cma_describe() - Helper to dump information about a single * CMA framebuffer object */ -void drm_fb_cma_describe (struct drm_framebuffer *fb,struct seq_file *m) +static void drm_fb_cma_describe (struct drm_framebuffer *fb,struct seq_file *m) {struct drm_fb_cma *fb_cma =to_fb_cma (fb);int i, n =drm_format_num_planes (fb->pixel_format);
@@ -199,7 +199,6 @@ void drm_fb_cma_describe(struct drm_framebuffer *fb, struct seq_file *m)drm_gem_cma_describe (fb_cma->obj[i], m); } } -EXPORT_SYMBOL_GPL (drm_fb_cma_describe);/** * drm_fb_cma_debugfs_show() - Helper to list CMA framebuffer objects
include/drm/drm_fb_cma_helper.h +0 -1
@@ -24,7 +24,6 @@ struct drm_gem_cma_object *drm_fb_cma_get_gem_obj(struct drm_framebuffer *fb, unsigned int plane);#ifdef CONFIG_DEBUG_FS -void drm_fb_cma_describe (struct drm_framebuffer *fb,struct seq_file *m);int drm_fb_cma_debugfs_show (struct seq_file *m,void *arg);#endif
Signature · 1 line
1.8.3.1
PATCH 7/8 drm: Remove unused PCI ids
In reply to Damien Lespiau--- include/drm/drm_pciids.h | 30 ------------------------------ 1 file changed, 30 deletions(-)
include/drm/drm_pciids.h +0 -30
@@ -690,29 +690,6 @@ {0x102b, 0x2527, PCI_ANY_ID, PCI_ANY_ID, 0, 0, MGA_CARD_TYPE_G550}, \ {0, 0, 0} -#define mach64_PCI_IDS \ - {0x1002, 0x4749, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ - {0x1002, 0x4750, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ - {0x1002, 0x4751, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ - {0x1002, 0x4742, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ - {0x1002, 0x4744, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ - {0x1002, 0x4c49, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ - {0x1002, 0x4c50, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ - {0x1002, 0x4c51, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ - {0x1002, 0x4c42, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ - {0x1002, 0x4c44, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ - {0x1002, 0x474c, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ - {0x1002, 0x474f, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ - {0x1002, 0x4752, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ - {0x1002, 0x4753, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ - {0x1002, 0x474d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ - {0x1002, 0x474e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ - {0x1002, 0x4c52, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ - {0x1002, 0x4c53, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ - {0x1002, 0x4c4d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ - {0x1002, 0x4c4e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ - {0, 0, 0} -#define sisdrv_PCI_IDS \ {0x1039, 0x0300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ {0x1039, 0x5300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
@@ -752,10 +729,6 @@ {0x8086, 0x1132, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ {0, 0, 0} -#define gamma_PCI_IDS \ - {0x3d3d, 0x0008, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ - {0, 0, 0} -#define savage_PCI_IDS \ {0x5333, 0x8a20, PCI_ANY_ID, PCI_ANY_ID, 0, 0, S3_SAVAGE3D}, \ {0x5333, 0x8a21, PCI_ANY_ID, PCI_ANY_ID, 0, 0, S3_SAVAGE3D}, \
@@ -781,6 +754,3 @@ {0x5333, 0x8d03, PCI_ANY_ID, PCI_ANY_ID, 0, 0, S3_PROSAVAGEDDR}, \ {0x5333, 0x8d04, PCI_ANY_ID, PCI_ANY_ID, 0, 0, S3_PROSAVAGEDDR}, \ {0, 0, 0} - -#define ffb_PCI_IDS \ - {0, 0, 0}
Signature · 1 line
1.8.3.1
PATCH 8/8 drm: Make drm_get_platform_dev() static
In reply to Damien LespiauIt's only used in drm_platform.c.
--- drivers/gpu/drm/drm_platform.c | 7 +++---- include/drm/drmP.h | 3 --- 2 files changed, 3 insertions(+), 7 deletions(-)
drivers/gpu/drm/drm_platform.c +3 -4
@@ -28,7 +28,7 @@#include <linux/export.h> #include <drm/drmP.h> -/** +/* * Register. * * \param platdev - Platform device struture
@@ -39,8 +39,8 @@* Try and register, if we fail to register, backout previous work. */ -int drm_get_platform_dev (struct platform_device *platdev, -struct drm_driver *driver) +static int drm_get_platform_dev (struct platform_device *platdev, +struct drm_driver *driver) {struct drm_device *dev;int ret;
@@ -107,7 +107,6 @@ err_g1:mutex_unlock (&drm_global_mutex);return ret; } -EXPORT_SYMBOL (drm_get_platform_dev);static int drm_platform_get_irq (struct drm_device *dev) {
include/drm/drmP.h +0 -3
@@ -1657,9 +1657,6 @@ extern int drm_pcie_get_speed_cap_mask(struct drm_device *dev, u32 *speed_mask);extern int drm_platform_init (struct drm_driver *driver,struct platform_device *platform_device);extern void drm_platform_exit (struct drm_driver *driver,struct platform_device *platform_device); -extern int drm_get_platform_dev (struct platform_device *pdev, -struct drm_driver *driver); -/* returns true if currently okay to sleep */ static __inline__bool drm_can_sleep (void ) {
Signature · 1 line
1.8.3.1
Re: [PATCH 8/8] drm: Make drm_get_platform_dev() static
Quoted 13 lines · Damien Lespiau
It's only used in
drm_platform.c.Signed-off-by Damien Lespiau <[email protected]>--- drivers/gpu/drm/drm_platform.c | 7 +++---- include/drm/drmP.h | 3 --- 2 files changed, 3 insertions(+), 7 deletions(-)drivers/gpu/drm/drm_platform.c +0
-0
drivers/gpu/drm/drm_platform.c line 34
Quoted 8 lines
drivers/gpu/drm/drm_platform.c +1
-1@@ -28,7 +28,7 @@#include <linux/export.h> #include <drm/drmP.h> -/** +/* * Register. * * \param platdev - Platform device struture
Was this change intentional? The rest of the comment is doxygen still.
Quoted 34 lines
drivers/gpu/drm/drm_platform.c +2
-3@@ -39,8 +39,8 @@* Try and register, if we fail to register, backout previous work. */ -int drm_get_platform_dev (struct platform_device *platdev, -struct drm_driver *driver) +static int drm_get_platform_dev (struct platform_device *platdev, +struct drm_driver *driver) {struct drm_device *dev;int ret;@@ -107,7 +107,6 @@ err_g1:mutex_unlock (&drm_global_mutex);return ret; } -EXPORT_SYMBOL (drm_get_platform_dev);static int drm_platform_get_irq (struct drm_device *dev) {include/drm/drmP.h +0
-3@@ -1657,9 +1657,6 @@ extern int drm_pcie_get_speed_cap_mask(struct drm_device *dev, u32 *speed_mask);extern int drm_platform_init (struct drm_driver *driver,struct platform_device *platform_device);extern void drm_platform_exit (struct drm_driver *driver,struct platform_device *platform_device); -extern int drm_get_platform_dev (struct platform_device *pdev, -struct drm_driver *driver); -/* returns true if currently okay to sleep */ static __inline__bool drm_can_sleep (void ) {
Re: [PATCH 8/8] drm: Make drm_get_platform_dev() static
Quoted 17 lines · Ian Romanick
Quoted 16 lines · Damien Lespiau
It's only used in
drm_platform.c.Signed-off-by Damien Lespiau <[email protected]>--- drivers/gpu/drm/drm_platform.c | 7 +++---- include/drm/drmP.h | 3 --- 2 files changed, 3 insertions(+), 7 deletions(-)drivers/gpu/drm/drm_platform.c +0
-0@@ -28,7 +28,7 @@#include <linux/export.h> #include <drm/drmP.h>
Quoted 7 lines
drivers/gpu/drm/drm_platform.c line 34
Quoted 5 lines
drivers/gpu/drm/drm_platform.c +1
-1-/** +/* * Register. * * \param platdev - Platform device struture Was this change intentional? The rest of the comment is doxygen still.
It was indeed, just to stop documentation tools from picking up that symbol that is not exported anymore. The documentation blob still contains markup to tag the parameters though, might as well leave it there.
Signature · 1 line
Damien
Quoted 36 lines
Quoted 35 lines
drivers/gpu/drm/drm_platform.c +2
-3@@ -39,8 +39,8 @@* Try and register, if we fail to register, backout previous work. */ -int drm_get_platform_dev (struct platform_device *platdev, -struct drm_driver *driver) +static int drm_get_platform_dev (struct platform_device *platdev, +struct drm_driver *driver) {struct drm_device *dev;int ret;@@ -107,7 +107,6 @@ err_g1:mutex_unlock (&drm_global_mutex);return ret; } -EXPORT_SYMBOL (drm_get_platform_dev);static int drm_platform_get_irq (struct drm_device *dev) {include/drm/drmP.h +0
-3@@ -1657,9 +1657,6 @@ extern int drm_pcie_get_speed_cap_mask(struct drm_device *dev, u32 *speed_mask);extern int drm_platform_init (struct drm_driver *driver,struct platform_device *platform_device);extern void drm_platform_exit (struct drm_driver *driver,struct platform_device *platform_device); -extern int drm_get_platform_dev (struct platform_device *pdev, -struct drm_driver *driver); -/* returns true if currently okay to sleep */ static __inline__bool drm_can_sleep (void ) {
Alex Deucher
Reviewed-byQuoted 2 lines · Damien Lespiau
A small pass on drm headers to remove some stale prototypes/functions/defines and to make static a few functions.
For the series:
Quoted 17 lines
drivers/gpu/drm/drm_crtc.c | 38 +++---------------------------------- drivers/gpu/drm/drm_fb_cma_helper.c | 5 ++--- drivers/gpu/drm/drm_modes.c | 21 -------------------- drivers/gpu/drm/drm_platform.c | 7 +++---- include/drm/drmP.h | 8 -------- include/drm/drm_crtc.h | 17 ----------------- include/drm/drm_fb_cma_helper.h | 1 - include/drm/drm_pciids.h | 30 ----------------------------- 8 files changed, 8 insertions(+), 119 deletions(-)--
Damien
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel