[Intel-gfx] [PATCH] drm/i915: Ditch SUPPORTS_INTEGRATED_HDMI|DP and use IS_G4X instead
Daniel Vetter
daniel at ffwll.ch
Tue Jul 7 02:37:28 PDT 2015
On Tue, Jul 07, 2015 at 11:07:02AM +0300, Ville Syrjälä wrote:
> On Tue, Jul 07, 2015 at 09:10:07AM +0200, Daniel Vetter wrote:
> > Since that's really what we want to test for. Note remove the gen5
> > case doesn't change anything: In intel_setup_outputs ilk is handled
> > already in the HAS_PCH_SPLIT case, and the register save/restore code
> > touches registers which simply don't exist on ilk ...
>
> The patch doesn't touch any register save/restore code. I guess it got
> nuked since the patch was originally made?
Yeah, forgot to update the commit message when rebasing. Fixed
>
> Apart from that I like it
> Reviewed-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
... and applied.
> Maybe kill SUPPORTS_DIGITAL_OUTPUTS() too? IMO it's just making it
> harder to figure out which branch each platform takes in
> intel_setup_outputs().
Good idea, will follow up with another one.
-Daniel
>
> >
> > v2: Drop UMS parts.
> >
> > Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
> >
> > Conflicts:
> > drivers/gpu/drm/i915/i915_drv.h
> > drivers/gpu/drm/i915/i915_ums.c
> > ---
> > drivers/gpu/drm/i915/i915_drv.h | 2 --
> > drivers/gpu/drm/i915/intel_display.c | 10 +++++-----
> > 2 files changed, 5 insertions(+), 7 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> > index 1dbd95710bf4..0d9a60b9e6c5 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.h
> > +++ b/drivers/gpu/drm/i915/i915_drv.h
> > @@ -2512,8 +2512,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_INTEGRATED_HDMI(dev) (IS_G4X(dev) || IS_GEN5(dev))
> > -#define SUPPORTS_INTEGRATED_DP(dev) (IS_G4X(dev) || IS_GEN5(dev))
> > #define SUPPORTS_TV(dev) (INTEL_INFO(dev)->supports_tv)
> > #define I915_HAS_HOTPLUG(dev) (INTEL_INFO(dev)->has_hotplug)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> > index 724b0e3a5d37..56316c1e945c 100644
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -14322,12 +14322,12 @@ static void intel_setup_outputs(struct drm_device *dev)
> > if (I915_READ(GEN3_SDVOB) & SDVO_DETECTED) {
> > DRM_DEBUG_KMS("probing SDVOB\n");
> > found = intel_sdvo_init(dev, GEN3_SDVOB, true);
> > - if (!found && SUPPORTS_INTEGRATED_HDMI(dev)) {
> > + if (!found && IS_G4X(dev)) {
> > DRM_DEBUG_KMS("probing HDMI on SDVOB\n");
> > intel_hdmi_init(dev, GEN4_HDMIB, PORT_B);
> > }
> >
> > - if (!found && SUPPORTS_INTEGRATED_DP(dev))
> > + if (!found && IS_G4X(dev))
> > intel_dp_init(dev, DP_B, PORT_B);
> > }
> >
> > @@ -14340,15 +14340,15 @@ static void intel_setup_outputs(struct drm_device *dev)
> >
> > if (!found && (I915_READ(GEN3_SDVOC) & SDVO_DETECTED)) {
> >
> > - if (SUPPORTS_INTEGRATED_HDMI(dev)) {
> > + if (IS_G4X(dev)) {
> > DRM_DEBUG_KMS("probing HDMI on SDVOC\n");
> > intel_hdmi_init(dev, GEN4_HDMIC, PORT_C);
> > }
> > - if (SUPPORTS_INTEGRATED_DP(dev))
> > + if (IS_G4X(dev))
> > intel_dp_init(dev, DP_C, PORT_C);
> > }
> >
> > - if (SUPPORTS_INTEGRATED_DP(dev) &&
> > + if (IS_G4X(dev) &&
> > (I915_READ(DP_D) & DP_DETECTED))
> > intel_dp_init(dev, DP_D, PORT_D);
> > } else if (IS_GEN2(dev))
> > --
> > 2.1.4
> >
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
> --
> Ville Syrjälä
> Intel OTC
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
More information about the Intel-gfx
mailing list