Skip to contentSkip to conversation

Removal of some unused defines

PATCH New Damien Lespiau 2 participants 6 messages Aug 19, 2013 – Aug 20, 2013

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

A small series to remove a few of those. I guess it's debatable if the i915_READ_* for ring registers should be removed or the code ported to always use those macros.

Signature · 1 line
Damien
#1 lore raw

PATCH 1/4 drm/i915: Remove DSPARB_HWCONTROL()

This define hasn't been used since:

commit 652c393a3368af84359da37c45afc35a91144960
Author: Jesse Barnes <[email protected]>
Date: Mon Aug 17 13:31:43 2009 -0700

drm/i915: add dynamic clock frequency control

---
 drivers/gpu/drm/i915/i915_drv.h | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +0 -2
index 1eb4d98..81774d5 100644
@@ -1560,8 +1560,6 @@ struct drm_i915_file_private {
 #define SUPPORTS_EDP(dev)		(IS_IRONLAKE_M(dev))
 #define SUPPORTS_TV(dev)		(INTEL_INFO(dev)->supports_tv)
 #define I915_HAS_HOTPLUG(dev)		 (INTEL_INFO(dev)->has_hotplug)
-/* dsparb controlled by hw only */
-#define DSPARB_HWCONTROL(dev) (IS_G4X(dev) || IS_IRONLAKE(dev))
 
 #define HAS_FW_BLC(dev) (INTEL_INFO(dev)->gen > 2)
 #define HAS_PIPE_CXSR(dev) (INTEL_INFO(dev)->has_pipe_cxsr)
Signature · 1 line
1.8.3.1
#2 lore raw

PATCH 2/4 drm/i915: Remove HAS_PIPE_CONTROL()

In reply to Damien Lespiau

The code using this was removed in:

commit 88f23b8fa3e6357c423af24ec31c661fc12f884b
Author: Chris Wilson <[email protected]>
Date: Sun Dec 5 15:08:31 2010 +0000

drm/i915: Avoid using PIPE_CONTROL on Ironlake

---
 drivers/gpu/drm/i915/i915_drv.h | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +0 -2
index 81774d5..27b680c 100644
@@ -1567,8 +1567,6 @@ struct drm_i915_file_private {
 
 #define HAS_IPS(dev)		(IS_ULT(dev))
 
-#define HAS_PIPE_CONTROL(dev) (INTEL_INFO(dev)->gen >= 5)
-
 #define HAS_DDI(dev)		(INTEL_INFO(dev)->has_ddi)
 #define HAS_POWER_WELL(dev)	(IS_HASWELL(dev))
 #define HAS_FPGA_DBG_UNCLAIMED(dev)	(INTEL_INFO(dev)->has_fpga_dbg)
Signature · 1 line
1.8.3.1
#3 lore raw

PATCH 3/4 drm: Remove IS_IRONLAKE_D()

In reply to Damien Lespiau

This define hasn't been used since:

commit cfdf1fa23f4074c9f8766dc67a928bbf680b1ac9
Author: Kristian Høgsberg <[email protected]>
Date: Wed Dec 16 15:16:16 2009 -0500

drm/i915: Implement IS_* macros using static tables

---
 drivers/gpu/drm/i915/i915_drv.h | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/i915/i915_drv.h +0 -1
index 27b680c..804643d 100644
@@ -1503,7 +1503,6 @@ struct drm_i915_file_private {
 #define IS_PINEVIEW_M(dev)	((dev)->pci_device == 0xa011)
 #define IS_PINEVIEW(dev)	(INTEL_INFO(dev)->is_pineview)
 #define IS_G33(dev)		(INTEL_INFO(dev)->is_g33)
-#define IS_IRONLAKE_D(dev)	((dev)->pci_device == 0x0042)
 #define IS_IRONLAKE_M(dev)	((dev)->pci_device == 0x0046)
 #define IS_IVYBRIDGE(dev)	(INTEL_INFO(dev)->is_ivybridge)
 #define IS_IVB_GT1(dev)		((dev)->pci_device == 0x0156 || \
Signature · 6 lines
1.8.3.1

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

PATCH 4/4 drm/i915: Remove I915_READ_{NOPID, SYNC_0, SYNC_1})()

In reply to Damien Lespiau

The code directly uses the registers and ring->mmio_base.

---
 drivers/gpu/drm/i915/intel_ringbuffer.h | 4 ----
 1 file changed, 4 deletions(-)
drivers/gpu/drm/i915/intel_ringbuffer.h +0 -4
index 5e6be84..432ad53 100644
@@ -33,10 +33,6 @@ struct  intel_hw_status_page {
 #define I915_READ_IMR(ring) I915_READ(RING_IMR((ring)->mmio_base))
 #define I915_WRITE_IMR(ring, val) I915_WRITE(RING_IMR((ring)->mmio_base), val)
 
-#define I915_READ_NOPID(ring) I915_READ(RING_NOPID((ring)->mmio_base))
-#define I915_READ_SYNC_0(ring) I915_READ(RING_SYNC_0((ring)->mmio_base))
-#define I915_READ_SYNC_1(ring) I915_READ(RING_SYNC_1((ring)->mmio_base))
-
 enum intel_ring_hangcheck_action {
 	HANGCHECK_WAIT,
 	HANGCHECK_ACTIVE,
Signature · 1 line
1.8.3.1
#5 lore raw
In reply to Damien Lespiau
Quoted 3 lines · Damien Lespiau

A small series to remove a few of those. I guess it's debatable if the i915_READ_* for ring registers should be removed or the code ported to always use those macros.

Entire series merged to dinq, thanks for the patches. -Daniel

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