[kernel/f15] Revert "Delete unused intel drm patches"
Adam Jackson
ajax at fedoraproject.org
Thu Jun 2 02:12:33 UTC 2011
commit f91329b1ad750b50750ffa114d2ba750aba4bd69
Author: Adam Jackson <ajax at redhat.com>
Date: Wed Jun 1 22:12:18 2011 -0400
Revert "Delete unused intel drm patches"
This reverts commit 53392f03f52c2a02804c739c35694bb1635ceb36.
drm-intel-big-hammer.patch | 21 ++++++
drm-intel-edp-fixes.patch | 44 ++++++++++++
drm-intel-eeebox-eb1007-quirk.patch | 36 ++++++++++
drm-intel-make-lvds-work.patch | 23 ++++++
drm-intel-next.patch | 1 +
drm-intel-restore-mode.patch | 128 +++++++++++++++++++++++++++++++++++
6 files changed, 253 insertions(+), 0 deletions(-)
---
diff --git a/drm-intel-big-hammer.patch b/drm-intel-big-hammer.patch
new file mode 100644
index 0000000..bf152af
--- /dev/null
+++ b/drm-intel-big-hammer.patch
@@ -0,0 +1,21 @@
+omgwtfbbqchainsaw?
+---
+ drivers/gpu/drm/i915/i915_gem_execbuffer.c | 5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
+index e698343..21e601d1 100644
+--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
++++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
+@@ -1090,6 +1090,11 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data,
+ if (ret)
+ goto pre_mutex_err;
+
++ /* We don't get the flushing right for these chipsets, use the
++ * big hammer for now to avoid random crashiness. */
++ if (IS_I85X(dev) || IS_I865G(dev))
++ wbinvd();
++
+ if (dev_priv->mm.suspended) {
+ mutex_unlock(&dev->struct_mutex);
+ ret = -EBUSY;
diff --git a/drm-intel-edp-fixes.patch b/drm-intel-edp-fixes.patch
new file mode 100644
index 0000000..c77ef11
--- /dev/null
+++ b/drm-intel-edp-fixes.patch
@@ -0,0 +1,44 @@
+diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
+index f737960..b1f8164 100644
+--- a/drivers/gpu/drm/i915/i915_drv.c
++++ b/drivers/gpu/drm/i915/i915_drv.c
+@@ -509,6 +509,8 @@ i915_pci_remove(struct pci_dev *pdev)
+ {
+ struct drm_device *dev = pci_get_drvdata(pdev);
+
++ pci_disable_device(pdev); /* core did previous enable */
++
+ drm_put_dev(dev);
+ }
+
+diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
+index 300f64b..2e3db37 100644
+--- a/drivers/gpu/drm/i915/intel_dp.c
++++ b/drivers/gpu/drm/i915/intel_dp.c
+@@ -795,7 +795,8 @@ static bool ironlake_edp_panel_on (struct intel_dp *intel_dp)
+ {
+ struct drm_device *dev = intel_dp->base.base.dev;
+ struct drm_i915_private *dev_priv = dev->dev_private;
+- u32 pp, idle_on_mask = PP_ON | PP_SEQUENCE_STATE_ON_IDLE;
++ u32 pp, idle_on = PP_ON | PP_SEQUENCE_STATE_ON_IDLE;
++ u32 idle_on_mask = PP_ON | PP_SEQUENCE_STATE_MASK;
+
+ if (I915_READ(PCH_PP_STATUS) & PP_ON)
+ return true;
+@@ -816,7 +817,7 @@ static bool ironlake_edp_panel_on (struct intel_dp *intel_dp)
+ */
+ msleep(300);
+
+- if (wait_for((I915_READ(PCH_PP_STATUS) & idle_on_mask) == idle_on_mask,
++ if (wait_for((I915_READ(PCH_PP_STATUS) & idle_on_mask) == idle_on,
+ 5000))
+ DRM_ERROR("panel on wait timed out: 0x%08x\n",
+ I915_READ(PCH_PP_STATUS));
+@@ -922,6 +923,7 @@ static void intel_dp_prepare(struct drm_encoder *encoder)
+
+ if (is_edp(intel_dp)) {
+ ironlake_edp_backlight_off(dev);
++ ironlake_edp_panel_off(dev);
+ ironlake_edp_panel_on(intel_dp);
+ if (!is_pch_edp(intel_dp))
+ ironlake_edp_pll_on(encoder);
diff --git a/drm-intel-eeebox-eb1007-quirk.patch b/drm-intel-eeebox-eb1007-quirk.patch
new file mode 100644
index 0000000..9ae3604
--- /dev/null
+++ b/drm-intel-eeebox-eb1007-quirk.patch
@@ -0,0 +1,36 @@
+From ab737b006568d01204cc51368c7e2067eecb2cff Mon Sep 17 00:00:00 2001
+From: Hans de Goede <hdegoede at redhat.com>
+Date: Thu, 7 Apr 2011 13:31:57 +0200
+Subject: [PATCH] drm/i915: Add a no lvds quirk for the Asus EeeBox PC EB1007
+
+I found this while figuring out why gnome-shell would not run on my
+Asus EeeBox PC EB1007. As a standalone "pc" this device cleary does not have
+an internal panel, yet it claims it does. Add a quirk to fix this.
+
+Signed-off-by: Hans de Goede <hdegoede at redhat.com>
+---
+ drivers/gpu/drm/i915/intel_lvds.c | 8 ++++++++
+ 1 files changed, 8 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
+index a562bd2..954822a 100644
+--- a/drivers/gpu/drm/i915/intel_lvds.c
++++ b/drivers/gpu/drm/i915/intel_lvds.c
+@@ -724,6 +724,14 @@ static const struct dmi_system_id intel_no_lvds[] = {
+ DMI_MATCH(DMI_PRODUCT_NAME, "U800"),
+ },
+ },
++ {
++ .callback = intel_no_lvds_dmi_callback,
++ .ident = "Asus EeeBox PC EB1007",
++ .matches = {
++ DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK Computer INC."),
++ DMI_MATCH(DMI_PRODUCT_NAME, "EB1007"),
++ },
++ },
+
+ { } /* terminating entry */
+ };
+--
+1.7.4.2
+
diff --git a/drm-intel-make-lvds-work.patch b/drm-intel-make-lvds-work.patch
new file mode 100644
index 0000000..209deb2
--- /dev/null
+++ b/drm-intel-make-lvds-work.patch
@@ -0,0 +1,23 @@
+ drivers/gpu/drm/i915/intel_display.c | 2 --
+ 1 files changed, 0 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
+index 990f065..171a797 100644
+--- a/drivers/gpu/drm/i915/intel_display.c
++++ b/drivers/gpu/drm/i915/intel_display.c
+@@ -4568,7 +4568,6 @@ void intel_release_load_detect_pipe(struct intel_encoder *intel_encoder,
+ struct drm_connector *connector, int dpms_mode)
+ {
+ struct drm_encoder *encoder = &intel_encoder->base;
+- struct drm_device *dev = encoder->dev;
+ struct drm_crtc *crtc = encoder->crtc;
+ struct drm_encoder_helper_funcs *encoder_funcs = encoder->helper_private;
+ struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private;
+@@ -4578,7 +4577,6 @@ void intel_release_load_detect_pipe(struct intel_encoder *intel_encoder,
+ connector->encoder = NULL;
+ intel_encoder->load_detect_temp = false;
+ crtc->enabled = drm_helper_crtc_in_use(crtc);
+- drm_helper_disable_unused_functions(dev);
+ }
+
+ /* Switch crtc and encoder back off if necessary */
diff --git a/drm-intel-next.patch b/drm-intel-next.patch
new file mode 100644
index 0000000..c6cac69
--- /dev/null
+++ b/drm-intel-next.patch
@@ -0,0 +1 @@
+empty
diff --git a/drm-intel-restore-mode.patch b/drm-intel-restore-mode.patch
new file mode 100644
index 0000000..b394ca0
--- /dev/null
+++ b/drm-intel-restore-mode.patch
@@ -0,0 +1,128 @@
+From e8e7a2b8ccfdae0d4cb6bd25824bbedcd42da316 Mon Sep 17 00:00:00 2001
+From: Dave Airlie <airlied at redhat.com>
+Date: Thu, 21 Apr 2011 22:18:32 +0100
+Subject: [PATCH] drm/i915: restore only the mode of this driver on lastclose (v2)
+
+i915 calls the panic handler function on last close to reset the modes,
+however this is a really bad idea for multi-gpu machines, esp shareable
+gpus machines. So add a new entry point for the driver to just restore
+its own fbcon mode.
+
+v2: move code into fb helper, fix panic code to block mode change on
+powered off GPUs.
+
+[airlied: this hits drm core and I wrote it and it was reviewed on intel-gfx
+ so really I signed it off twice ;-).]
+Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
+Signed-off-by: Dave Airlie <airlied at redhat.com>
+---
+ drivers/gpu/drm/drm_fb_helper.c | 27 ++++++++++++++++++++-------
+ drivers/gpu/drm/i915/i915_dma.c | 2 +-
+ drivers/gpu/drm/i915/intel_drv.h | 1 +
+ drivers/gpu/drm/i915/intel_fb.c | 10 ++++++++++
+ include/drm/drm_fb_helper.h | 1 +
+ 5 files changed, 33 insertions(+), 8 deletions(-)
+
+diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
+index 9507204..11d7a72 100644
+--- a/drivers/gpu/drm/drm_fb_helper.c
++++ b/drivers/gpu/drm/drm_fb_helper.c
+@@ -342,9 +342,22 @@ int drm_fb_helper_debug_leave(struct fb_info *info)
+ }
+ EXPORT_SYMBOL(drm_fb_helper_debug_leave);
+
++bool drm_fb_helper_restore_fbdev_mode(struct drm_fb_helper *fb_helper)
++{
++ bool error = false;
++ int i, ret;
++ for (i = 0; i < fb_helper->crtc_count; i++) {
++ struct drm_mode_set *mode_set = &fb_helper->crtc_info[i].mode_set;
++ ret = drm_crtc_helper_set_config(mode_set);
++ if (ret)
++ error = true;
++ }
++ return error;
++}
++EXPORT_SYMBOL(drm_fb_helper_restore_fbdev_mode);
++
+ bool drm_fb_helper_force_kernel_mode(void)
+ {
+- int i = 0;
+ bool ret, error = false;
+ struct drm_fb_helper *helper;
+
+@@ -352,12 +365,12 @@ bool drm_fb_helper_force_kernel_mode(void)
+ return false;
+
+ list_for_each_entry(helper, &kernel_fb_helper_list, kernel_fb_list) {
+- for (i = 0; i < helper->crtc_count; i++) {
+- struct drm_mode_set *mode_set = &helper->crtc_info[i].mode_set;
+- ret = drm_crtc_helper_set_config(mode_set);
+- if (ret)
+- error = true;
+- }
++ if (helper->dev->switch_power_state == DRM_SWITCH_POWER_OFF)
++ continue;
++
++ ret = drm_fb_helper_restore_fbdev_mode(helper);
++ if (ret)
++ error = true;
+ }
+ return error;
+ }
+diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
+index 7273037..12876f2 100644
+--- a/drivers/gpu/drm/i915/i915_dma.c
++++ b/drivers/gpu/drm/i915/i915_dma.c
+@@ -2207,7 +2207,7 @@ void i915_driver_lastclose(struct drm_device * dev)
+ drm_i915_private_t *dev_priv = dev->dev_private;
+
+ if (!dev_priv || drm_core_check_feature(dev, DRIVER_MODESET)) {
+- drm_fb_helper_restore();
++ intel_fb_restore_mode(dev);
+ vga_switcheroo_process_delayed_switch();
+ return;
+ }
+diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
+index f5b0d83..1d20712 100644
+--- a/drivers/gpu/drm/i915/intel_drv.h
++++ b/drivers/gpu/drm/i915/intel_drv.h
+@@ -338,4 +338,5 @@ extern int intel_overlay_attrs(struct drm_device *dev, void *data,
+ struct drm_file *file_priv);
+
+ extern void intel_fb_output_poll_changed(struct drm_device *dev);
++extern void intel_fb_restore_mode(struct drm_device *dev);
+ #endif /* __INTEL_DRV_H__ */
+diff --git a/drivers/gpu/drm/i915/intel_fb.c b/drivers/gpu/drm/i915/intel_fb.c
+index 5127827..ec49bae 100644
+--- a/drivers/gpu/drm/i915/intel_fb.c
++++ b/drivers/gpu/drm/i915/intel_fb.c
+@@ -264,3 +264,13 @@ void intel_fb_output_poll_changed(struct drm_device *dev)
+ drm_i915_private_t *dev_priv = dev->dev_private;
+ drm_fb_helper_hotplug_event(&dev_priv->fbdev->helper);
+ }
++
++void intel_fb_restore_mode(struct drm_device *dev)
++{
++ int ret;
++ drm_i915_private_t *dev_priv = dev->dev_private;
++
++ ret = drm_fb_helper_restore_fbdev_mode(&dev_priv->fbdev->helper);
++ if (ret)
++ DRM_DEBUG("failed to restore crtc mode\n");
++}
+diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h
+index f22e7fe..ade09d7 100644
+--- a/include/drm/drm_fb_helper.h
++++ b/include/drm/drm_fb_helper.h
+@@ -118,6 +118,7 @@ int drm_fb_helper_setcolreg(unsigned regno,
+ unsigned transp,
+ struct fb_info *info);
+
++bool drm_fb_helper_restore_fbdev_mode(struct drm_fb_helper *fb_helper);
+ void drm_fb_helper_restore(void);
+ void drm_fb_helper_fill_var(struct fb_info *info, struct drm_fb_helper *fb_helper,
+ uint32_t fb_width, uint32_t fb_height);
+--
+1.7.1
+
More information about the scm-commits
mailing list