drm/i915: Inline SUPPORTS_DIGITAL_OUTPUTS
Subsystems (2)
PATCH 1/1 drm/i915: Inline SUPPORTS_DIGITAL_OUTPUTS
After the register save/restore code is gone there's just one user left and it just obfuscates that one. Remove it.
--- drivers/gpu/drm/i915/i915_drv.h | 1 - drivers/gpu/drm/i915/intel_display.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +0 -1
@@ -2511,7 +2511,6 @@ struct drm_i915_cmd_table {*/ #define HAS_128_BYTE_Y_TILING (dev) (!IS_GEN2(dev) && !(IS_I915G(dev) || \ IS_I915GM(dev))) -#define SUPPORTS_DIGITAL_OUTPUTS (dev) (!IS_GEN2(dev) && !IS_PINEVIEW(dev))#define SUPPORTS_TV (dev) (INTEL_INFO(dev)->supports_tv)#define I915_HAS_HOTPLUG (dev) (INTEL_INFO(dev)->has_hotplug)
drivers/gpu/drm/i915/intel_display.c +1 -1
@@ -14316,7 +14316,7 @@ static void intel_setup_outputs(struct drm_device *dev) }intel_dsi_init (dev); - }else if (SUPPORTS_DIGITAL_OUTPUTS (dev)) { + }else if (!IS_GEN2 (dev) && !IS_PINEVIEW (dev)) {bool found = false;if (I915_READ (GEN3_SDVOB ) &SDVO_DETECTED ) {
Signature · 6 lines
2.1.4 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 28 lines · Daniel Vetter
After the register save/restore code is gone there's just one user left and it just obfuscates that one. Remove it.
Cc Ville Syrjälä <[email protected]>Suggested-by Ville Syrjälä <[email protected]>Signed-off-by Daniel Vetter <[email protected]>--- drivers/gpu/drm/i915/i915_drv.h | 1 - drivers/gpu/drm/i915/intel_display.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-)drivers/gpu/drm/i915/i915_drv.h +0
-1@@ -2511,7 +2511,6 @@ struct drm_i915_cmd_table {*/ #define HAS_128_BYTE_Y_TILING (dev) (!IS_GEN2(dev) && !(IS_I915G(dev) || \ IS_I915GM(dev))) -#define SUPPORTS_DIGITAL_OUTPUTS (dev) (!IS_GEN2(dev) && !IS_PINEVIEW(dev))#define SUPPORTS_TV (dev) (INTEL_INFO(dev)->supports_tv)#define I915_HAS_HOTPLUG (dev) (INTEL_INFO(dev)->has_hotplug)drivers/gpu/drm/i915/intel_display.c +0
-0
drivers/gpu/drm/i915/intel_display.c static void intel_setup_outputs(struct drm_device *dev) · line 14322
Quoted 8 lines
drivers/gpu/drm/i915/intel_display.c +1
-1@@ -14316,7 +14316,7 @@ static void intel_setup_outputs(struct drm_device *dev) }intel_dsi_init (dev); - }else if (SUPPORTS_DIGITAL_OUTPUTS (dev)) { + }else if (!IS_GEN2 (dev) && !IS_PINEVIEW (dev)) {bool found = false;if (I915_READ (GEN3_SDVOB ) &SDVO_DETECTED ) {
That is one wierd if-tree. At least half the problem is that we cannot see the if-elif-else chain because each branch is over a page high! And the other half is that there is no apparent logic between say HAS_DDI or HAS_PCH_SPLIT so knowing which should be applying to your device of interest is difficult.
Anyway,
-Chris
Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Daniel Vetter
AppliedQuoted 36 lines · Chris Wilson
Quoted 35 lines · Daniel Vetter
After the register save/restore code is gone there's just one user left and it just obfuscates that one. Remove it.
Cc Ville Syrjälä <[email protected]>Suggested-by Ville Syrjälä <[email protected]>Signed-off-by Daniel Vetter <[email protected]>--- drivers/gpu/drm/i915/i915_drv.h | 1 - drivers/gpu/drm/i915/intel_display.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-)drivers/gpu/drm/i915/i915_drv.h +0
-1@@ -2511,7 +2511,6 @@ struct drm_i915_cmd_table {*/ #define HAS_128_BYTE_Y_TILING (dev) (!IS_GEN2(dev) && !(IS_I915G(dev) || \ IS_I915GM(dev))) -#define SUPPORTS_DIGITAL_OUTPUTS (dev) (!IS_GEN2(dev) && !IS_PINEVIEW(dev))#define SUPPORTS_TV (dev) (INTEL_INFO(dev)->supports_tv)#define I915_HAS_HOTPLUG (dev) (INTEL_INFO(dev)->has_hotplug)drivers/gpu/drm/i915/intel_display.c +1
-1@@ -14316,7 +14316,7 @@ static void intel_setup_outputs(struct drm_device *dev) }intel_dsi_init (dev); - }else if (SUPPORTS_DIGITAL_OUTPUTS (dev)) { + }else if (!IS_GEN2 (dev) && !IS_PINEVIEW (dev)) {bool found = false;
Quoted 7 lines
drivers/gpu/drm/i915/intel_display.c static void intel_setup_outputs(struct drm_device *dev) · line 14322
Quoted 1 line
drivers/gpu/drm/i915/intel_display.c +0
-0if (I915_READ (GEN3_SDVOB ) &SDVO_DETECTED ) {That is one wierd if-tree. At least half the problem is that we cannot see the if-elif-else chain because each branch is over a page high! And the other half is that there is no apparent logic between say
HAS_DDIorHAS_PCH_SPLITso knowing which should be applying to your device of interest is difficult.
It is. I tried pushing some of the decisions into lower-level functions (like the detection for dig ports) to clean it up a bit, but didn't improve really. No other idea thus far what to do with it.
Quoted 2 lines
Anyway,
Reviewed-by Chris Wilson <[email protected]>
Queued for -next, thanks for the review.
-Daniel
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