Re: [Intel-gfx] [PATCH 2/2] drm/i915: Short-circuit no-op vga_set_state()
On Mon, 16 Dec 2013, Chris Wilson ch...@chris-wilson.co.uk wrote: Touching the VGA registers risks a hard machine hang, at least on this ivb machine after removing a conflicting efifb. This is more than likely related to the discovery that VGA IO decode on the more recent PCH platforms is terminally broken. Please double check the config space address. At a glance, it looks like we should be using SNB_GMCH_CTRL since SNB. Might explain the issues? Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk Cc: Ville Syrjälä ville.syrj...@linux.intel.com --- drivers/gpu/drm/i915/intel_display.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 7db292c469af..d9b91a585dbf 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -11341,6 +11341,9 @@ int intel_modeset_vga_set_state(struct drm_device *dev, bool state) return -EIO; } + if (!!(gmch_ctrl INTEL_GMCH_VGA_DISABLE) == !state) + return 0; + I think I'd use a temp gmch_ctrl, make the change below on that, and then compare the new and old values. Just to avoid the use of negatives so much. Either way, the patch is Reviewed-by: Jani Nikula jani.nik...@intel.com *iff* it's still needed with the verified config space address. BR, Jani. if (state) gmch_ctrl = ~INTEL_GMCH_VGA_DISABLE; else -- 1.8.5.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Jani Nikula, Intel Open Source Technology Center ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 2/2] drm/i915: Short-circuit no-op vga_set_state()
On Tue, Dec 17, 2013 at 11:21:27AM +0200, Jani Nikula wrote: On Mon, 16 Dec 2013, Chris Wilson ch...@chris-wilson.co.uk wrote: Touching the VGA registers risks a hard machine hang, at least on this ivb machine after removing a conflicting efifb. This is more than likely related to the discovery that VGA IO decode on the more recent PCH platforms is terminally broken. Please double check the config space address. At a glance, it looks like we should be using SNB_GMCH_CTRL since SNB. Might explain the issues? Hmm, indeed. This bit is at a different location on SNB, but it is locked. Which is where all the vgaarb madness began last time. -Chris -- Chris Wilson, Intel Open Source Technology Centre ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 2/2] drm/i915: Short-circuit no-op vga_set_state()
On Tue, Dec 17, 2013 at 11:45:45AM +, Chris Wilson wrote: On Tue, Dec 17, 2013 at 11:21:27AM +0200, Jani Nikula wrote: On Mon, 16 Dec 2013, Chris Wilson ch...@chris-wilson.co.uk wrote: Touching the VGA registers risks a hard machine hang, at least on this ivb machine after removing a conflicting efifb. This is more than likely related to the discovery that VGA IO decode on the more recent PCH platforms is terminally broken. Please double check the config space address. At a glance, it looks like we should be using SNB_GMCH_CTRL since SNB. Might explain the issues? Hmm, indeed. This bit is at a different location on SNB, but it is locked. Which is where all the vgaarb madness began last time. Ok, that feels at least as stable as not writing to the invalid address. -Chris -- Chris Wilson, Intel Open Source Technology Centre ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 2/2] drm/i915: Short-circuit no-op vga_set_state()
Touching the VGA registers risks a hard machine hang, at least on this ivb machine after removing a conflicting efifb. This is more than likely related to the discovery that VGA IO decode on the more recent PCH platforms is terminally broken. Signed-off-by: Chris Wilson ch...@chris-wilson.co.uk Cc: Ville Syrjälä ville.syrj...@linux.intel.com --- drivers/gpu/drm/i915/intel_display.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 7db292c469af..d9b91a585dbf 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -11341,6 +11341,9 @@ int intel_modeset_vga_set_state(struct drm_device *dev, bool state) return -EIO; } + if (!!(gmch_ctrl INTEL_GMCH_VGA_DISABLE) == !state) + return 0; + if (state) gmch_ctrl = ~INTEL_GMCH_VGA_DISABLE; else -- 1.8.5.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx