Skip to contentSkip to conversation

drm/gma500: Remove useless define

PATCH Applied Stéphane Marchesin 4 participants 7 messages Jul 31, 2013 – Aug 5, 2013

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

PATCH 1/3 drm/gma500: Remove useless define

---
 drivers/gpu/drm/gma500/cdv_intel_display.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/gma500/cdv_intel_display.c +0 -2
index 82430ad..d691a3a 100644
@@ -52,8 +52,6 @@ struct cdv_intel_clock_t {
 	int p;
 };
 
-#define INTEL_P2_NUM		      2
-
 struct cdv_intel_limit_t {
 	struct cdv_intel_range_t dot, vco, n, m, m1, m2, p, p1;
 	struct cdv_intel_p2_t p2;
Signature · 6 lines
1.8.3

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

PATCH 2/3 drm/i915: Remove useless define

---
 drivers/gpu/drm/i915/intel_display.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/i915/intel_display.c +0 -1
index 5fb3058..37b33c9 100644
@@ -54,7 +54,6 @@ typedef struct {
 	int	p2_slow, p2_fast;
 } intel_p2_t;
 
-#define INTEL_P2_NUM		      2
 typedef struct intel_limit intel_limit_t;
 struct intel_limit {
 	intel_range_t   dot, vco, n, m, m1, m2, p, p1;
Signature · 6 lines
1.8.3

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

Re: [PATCH 2/3] drm/i915: Remove useless define

Quoted 1 line · Stéphane Marchesin

Queued for -next, thanks for the patch.
-Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
#3 lore raw

PATCH 3/3 drm: Remove drm_mode_validate_clocks

In reply to Stéphane Marchesin
---
 drivers/gpu/drm/drm_modes.c | 37 -------------------------------------
 include/drm/drm_crtc.h      |  3 ---
 2 files changed, 40 deletions(-)
drivers/gpu/drm/drm_modes.c +0 -37
index a6729bf..504a602 100644
@@ -923,43 +923,6 @@ void drm_mode_validate_size(struct drm_device *dev,
 EXPORT_SYMBOL(drm_mode_validate_size);
 
 /**
- * drm_mode_validate_clocks - validate modes against clock limits
- * @dev: DRM device
- * @mode_list: list of modes to check
- * @min: minimum clock rate array
- * @max: maximum clock rate array
- * @n_ranges: number of clock ranges (size of arrays)
- *
- * LOCKING:
- * Caller must hold a lock protecting @mode_list.
- *
- * Some code may need to check a mode list against the clock limits of the
- * device in question.  This function walks the mode list, testing to make
- * sure each mode falls within a given range (defined by @min and @max
- * arrays) and sets @mode->status as needed.
- */
-void drm_mode_validate_clocks(struct drm_device *dev,
-			      struct list_head *mode_list,
-			      int *min, int *max, int n_ranges)
-{
-	struct drm_display_mode *mode;
-	int i;
-
-	list_for_each_entry(mode, mode_list, head) {
-		bool good = false;
-		for (i = 0; i < n_ranges; i++) {
-			if (mode->clock >= min[i] && mode->clock <= max[i]) {
-				good = true;
-				break;
-			}
-		}
-		if (!good)
-			mode->status = MODE_CLOCK_RANGE;
-	}
-}
-EXPORT_SYMBOL(drm_mode_validate_clocks);
-
-/**
  * drm_mode_prune_invalid - remove invalid modes from mode list
  * @dev: DRM device
  * @mode_list: list of modes to check
include/drm/drm_crtc.h +0 -3
index fa12a2f..32e0820 100644
@@ -930,9 +930,6 @@ extern void drm_mode_list_concat(struct list_head *head,
 extern void drm_mode_validate_size(struct drm_device *dev,
 				   struct list_head *mode_list,
 				   int maxX, int maxY, int maxPitch);
-extern void drm_mode_validate_clocks(struct drm_device *dev,
-				     struct list_head *mode_list,
-				     int *min, int *max, int n_ranges);
 extern void drm_mode_prune_invalid(struct drm_device *dev,
 				   struct list_head *mode_list, bool verbose);
 extern void drm_mode_sort(struct list_head *mode_list);
Signature · 6 lines
1.8.3

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v1 3/3
#4 lore raw

Re: [PATCH 3/3] drm: Remove drm_mode_validate_clocks

Hi

Quoted 1 line · Stéphane Marchesin

Something like "unused" in the commit message makes "git log [--oneline]" much more verbose without the need to read the patch. Apart from that:

I also did a short "grep MODE_CLOCK_RANGE" and radeon/i915 tv-helpers are the last users. All others use MODE_BAD. But I guess MODE_CLOCK_RANGE is more verbose so there is no need to remove it.

Regards
David

Quoted 74 lines
---
 drivers/gpu/drm/drm_modes.c | 37 -------------------------------------
 include/drm/drm_crtc.h      |  3 ---
 2 files changed, 40 deletions(-)
drivers/gpu/drm/drm_modes.c +0 -37
index a6729bf..504a602 100644
@@ -923,43 +923,6 @@ void drm_mode_validate_size(struct drm_device *dev,
 EXPORT_SYMBOL(drm_mode_validate_size);
 
 /**
- * drm_mode_validate_clocks - validate modes against clock limits
- * @dev: DRM device
- * @mode_list: list of modes to check
- * @min: minimum clock rate array
- * @max: maximum clock rate array
- * @n_ranges: number of clock ranges (size of arrays)
- *
- * LOCKING:
- * Caller must hold a lock protecting @mode_list.
- *
- * Some code may need to check a mode list against the clock limits of the
- * device in question.  This function walks the mode list, testing to make
- * sure each mode falls within a given range (defined by @min and @max
- * arrays) and sets @mode->status as needed.
- */
-void drm_mode_validate_clocks(struct drm_device *dev,
-                             struct list_head *mode_list,
-                             int *min, int *max, int n_ranges)
-{
-       struct drm_display_mode *mode;
-       int i;
-
-       list_for_each_entry(mode, mode_list, head) {
-               bool good = false;
-               for (i = 0; i < n_ranges; i++) {
-                       if (mode->clock >= min[i] && mode->clock <= max[i]) {
-                               good = true;
-                               break;
-                       }
-               }
-               if (!good)
-                       mode->status = MODE_CLOCK_RANGE;
-       }
-}
-EXPORT_SYMBOL(drm_mode_validate_clocks);
-
-/**
  * drm_mode_prune_invalid - remove invalid modes from mode list
  * @dev: DRM device
  * @mode_list: list of modes to check
include/drm/drm_crtc.h +0 -4
index fa12a2f..32e0820 100644
@@ -930,9 +930,6 @@ extern void drm_mode_list_concat(struct list_head *head,
 extern void drm_mode_validate_size(struct drm_device *dev,
                                   struct list_head *mode_list,
                                   int maxX, int maxY, int maxPitch);
-extern void drm_mode_validate_clocks(struct drm_device *dev,
-                                    struct list_head *mode_list,
-                                    int *min, int *max, int n_ranges);
 extern void drm_mode_prune_invalid(struct drm_device *dev,
                                   struct list_head *mode_list, bool verbose);
 extern void drm_mode_sort(struct list_head *mode_list);
--

1.8.3

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

#5 lore raw

Re: [PATCH 3/3] drm: Remove drm_mode_validate_clocks

In reply to Stéphane Marchesin
Quoted 1 line · Stéphane Marchesin

Ben originally picked this up into his danvet-on-vactaion tree, but since it's for core drm it needs to go in through Dave's tree. -Daniel

Quoted 74 lines
---
 drivers/gpu/drm/drm_modes.c | 37 -------------------------------------
 include/drm/drm_crtc.h      |  3 ---
 2 files changed, 40 deletions(-)
drivers/gpu/drm/drm_modes.c +0 -37
index a6729bf..504a602 100644
@@ -923,43 +923,6 @@ void drm_mode_validate_size(struct drm_device *dev,
 EXPORT_SYMBOL(drm_mode_validate_size);
 
 /**
- * drm_mode_validate_clocks - validate modes against clock limits
- * @dev: DRM device
- * @mode_list: list of modes to check
- * @min: minimum clock rate array
- * @max: maximum clock rate array
- * @n_ranges: number of clock ranges (size of arrays)
- *
- * LOCKING:
- * Caller must hold a lock protecting @mode_list.
- *
- * Some code may need to check a mode list against the clock limits of the
- * device in question.  This function walks the mode list, testing to make
- * sure each mode falls within a given range (defined by @min and @max
- * arrays) and sets @mode->status as needed.
- */
-void drm_mode_validate_clocks(struct drm_device *dev,
-			      struct list_head *mode_list,
-			      int *min, int *max, int n_ranges)
-{
-	struct drm_display_mode *mode;
-	int i;
-
-	list_for_each_entry(mode, mode_list, head) {
-		bool good = false;
-		for (i = 0; i < n_ranges; i++) {
-			if (mode->clock >= min[i] && mode->clock <= max[i]) {
-				good = true;
-				break;
-			}
-		}
-		if (!good)
-			mode->status = MODE_CLOCK_RANGE;
-	}
-}
-EXPORT_SYMBOL(drm_mode_validate_clocks);
-
-/**
  * drm_mode_prune_invalid - remove invalid modes from mode list
  * @dev: DRM device
  * @mode_list: list of modes to check
include/drm/drm_crtc.h +0 -3
index fa12a2f..32e0820 100644
@@ -930,9 +930,6 @@ extern void drm_mode_list_concat(struct list_head *head,
 extern void drm_mode_validate_size(struct drm_device *dev,
 				   struct list_head *mode_list,
 				   int maxX, int maxY, int maxPitch);
-extern void drm_mode_validate_clocks(struct drm_device *dev,
-				     struct list_head *mode_list,
-				     int *min, int *max, int n_ranges);
 extern void drm_mode_prune_invalid(struct drm_device *dev,
 				   struct list_head *mode_list, bool verbose);
 extern void drm_mode_sort(struct list_head *mode_list);
Signature · 6 lines
1.8.3

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
maintainer
#6 lore raw
In reply to Stéphane Marchesin
Quoted 19 lines · Stéphane Marchesin
---
 drivers/gpu/drm/gma500/cdv_intel_display.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/gma500/cdv_intel_display.c +0 -3
index 82430ad..d691a3a 100644
@@ -52,8 +52,6 @@ struct cdv_intel_clock_t {
        int p;
 };
 
-#define INTEL_P2_NUM                 2
-
 struct cdv_intel_limit_t {
        struct cdv_intel_range_t dot, vco, n, m, m1, m2, p, p1;
        struct cdv_intel_p2_t p2;
--
Quoted 1 line

1.8.3

Hi Stéphane

I have already removed that define in my gma500-next branch. You can check the official repo at: git://github.com/patjak/drm-gma500 gma500-next

Thanks
Patrik Jakobsson