Skip to contentSkip to conversation

gma500: More pruning

PATCH In review Alan Cox 3 participants 3 messages Feb 24, 2011 – Mar 1, 2011

Subsystems (2)
lore
Share & tools
lore

Alan Cox

author
#0 lore raw

PATCH 1/1 gma500: More pruning

[Sits on top of Matthews opregion patch]

Address the bits that Matthew noted. Also prune various ioctl stuff and interfaces we don't care about

Disable the opregion changes - they crash on the Dell Mini 10.

---

 drivers/acpi/acpi_igd_opregion.c        |    2 
 drivers/staging/gma500/psb_bl.c         |   10 -
 drivers/staging/gma500/psb_drm.h        |  507 ++++++-----------------------
 drivers/staging/gma500/psb_drv.c        |   49 ---
 drivers/staging/gma500/psb_drv.h        |    1 
 drivers/staging/gma500/psb_gfx.mod.c    |    4 
 drivers/staging/gma500/psb_intel_bios.c |    2 
 drivers/staging/gma500/psb_intel_bios.h |    2 
 drivers/staging/gma500/psb_intel_reg.h  |  548 ++++++++++++++-----------------
 drivers/staging/gma500/psb_irq.c        |    4 
 drivers/staging/gma500/psb_powermgmt.c  |    5 
 11 files changed, 364 insertions(+), 770 deletions(-)
drivers/acpi/acpi_igd_opregion.c +1 -1
index df706b6..de815d7 100644
@@ -329,7 +329,7 @@ void igd_opregion_init(struct opregion_dev *dev)
 		register_acpi_notifier(&igd_opregion_notifier);
 	}
 
-	if (opregion->asle)
+	if (opregion->asle && dev->enable_asle)
 		dev->enable_asle(dev->drm_dev);
 }
 EXPORT_SYMBOL(igd_opregion_init);
drivers/staging/gma500/psb_bl.c +6 -4
index 52edb43..70c17b3 100644
@@ -1,5 +1,5 @@
 /*
- *  psb backlight using HAL
+ *  psb backlight interface
  *
  * Copyright (c) 2009, Intel Corporation.
  *
@@ -73,6 +73,8 @@ int psb_get_brightness(struct backlight_device *bd)
 	DRM_DEBUG_DRIVER("brightness = 0x%x\n", psb_brightness);
 
 	/* return locally cached var instead of HW read (due to DPST etc.) */
+	/* FIXME: ideally return actual value in case firmware fiddled with
+	   it */
 	return psb_brightness;
 }
 
@@ -83,7 +85,7 @@ static const struct backlight_ops psb_ops = {
 
 static int device_backlight_init(struct drm_device *dev)
 {
-	unsigned long CoreClock;
+	unsigned long core_clock;
 	/* u32 bl_max_freq; */
 	/* unsigned long value; */
 	u16 bl_max_freq;
@@ -102,9 +104,9 @@ static int device_backlight_init(struct drm_device *dev)
 	blc_brightnesscmd = dev_priv->lvds_bl->brightnesscmd;
 	blc_type = dev_priv->lvds_bl->type;
 
-	CoreClock = dev_priv->core_freq;
+	core_clock = dev_priv->core_freq;
 
-	value = (CoreClock * MHz) / BLC_PWM_FREQ_CALC_CONSTANT;
+	value = (core_clock * MHz) / BLC_PWM_FREQ_CALC_CONSTANT;
 	value *= blc_pwm_precision_factor;
 	value /= bl_max_freq;
 	value /= blc_pwm_precision_factor;
drivers/staging/gma500/psb_drm.h +104 -403

645 lines not on this page · raw message

drivers/staging/gma500/psb_drv.c +5 -44

115 lines not on this page · raw message

drivers/staging/gma500/psb_drv.h +0 -1
index 30d161e..4f5c67e 100644
@@ -356,7 +356,6 @@ struct drm_psb_private {
 
 	unsigned long chipset;
 
-	struct drm_psb_dev_info_arg dev_info;
 	struct drm_psb_uopt uopt;
 
 	struct psb_gtt *pg;
drivers/staging/gma500/psb_gfx.mod.c +2 -2
index 14772c4..d7d2afc 100644
@@ -19,9 +19,9 @@ MODULE_INFO(staging, "Y");
 static const char __module_depends[]
 __used
 __attribute__((section(".modinfo"))) =
-"depends=video";
+"depends=ttm,drm,drm_kms_helper,i2c-core,cfbfillrect,video,cfbimgblt,acpi_igd_opregion,cfbcopyarea,i2c-algo-bit";
 
 MODULE_ALIAS("pci:v00008086d00008108sv*sd*bc*sc*i*");
 MODULE_ALIAS("pci:v00008086d00008109sv*sd*bc*sc*i*");
 
-MODULE_INFO(srcversion, "B869B52B58BF27553563032");
+MODULE_INFO(srcversion, "BAD33CD8BAE640651EBA1A4");
drivers/staging/gma500/psb_intel_bios.c +1 -1
index 83d8e93..f5bcd11 100644
@@ -273,7 +273,7 @@ bool psb_intel_init_bios(struct drm_device *dev)
 /**
  * Destory and free VBT data
  */
-void psb_intel_destory_bios(struct drm_device *dev)
+void psb_intel_destroy_bios(struct drm_device *dev)
 {
 	struct drm_psb_private *dev_priv = dev->dev_private;
 	struct drm_display_mode *sdvo_lvds_vbt_mode =
drivers/staging/gma500/psb_intel_bios.h +1 -1
index dfcae62..aaf3fd1 100644
@@ -304,7 +304,7 @@ struct bdb_sdvo_lvds_options {
 
 
 extern bool psb_intel_init_bios(struct drm_device *dev);
-extern void psb_intel_destory_bios(struct drm_device *dev);
+extern void psb_intel_destroy_bios(struct drm_device *dev);
 
 /*
  * Driver<->VBIOS interaction occurs through scratch bits in
drivers/staging/gma500/psb_intel_reg.h +242 -306

788 lines not on this page · raw message

drivers/staging/gma500/psb_irq.c +2 -2
index 3cdcd1e..a0ef4bb 100644
@@ -420,9 +420,9 @@ void psb_irq_turn_on_dpst(struct drm_device *dev)
 
 	if (ospm_power_using_hw_begin(OSPM_DISPLAY_ISLAND,
 							OSPM_UHB_ONLY_IF_ON)) {
-		PSB_WVDC32(BIT31, HISTOGRAM_LOGIC_CONTROL);
+		PSB_WVDC32(1 << 31, HISTOGRAM_LOGIC_CONTROL);
 		hist_reg = PSB_RVDC32(HISTOGRAM_LOGIC_CONTROL);
-		PSB_WVDC32(BIT31, HISTOGRAM_INT_CONTROL);
+		PSB_WVDC32(1 << 31, HISTOGRAM_INT_CONTROL);
 		hist_reg = PSB_RVDC32(HISTOGRAM_INT_CONTROL);
 
 		PSB_WVDC32(0x80010100, PWM_CONTROL_LOGIC);
drivers/staging/gma500/psb_powermgmt.c +0 -5
index 3a6ffb7..f5740dc 100644
@@ -287,11 +287,6 @@ static void ospm_suspend_pci(struct pci_dev *pdev)
 	printk(KERN_ALERT "ospm_suspend_pci\n");
 #endif
 
-#ifdef CONFIG_MDFD_GL3
-	// Power off GL3 after all GFX sub-systems are powered off.
-	ospm_power_island_down(OSPM_GL3_CACHE_ISLAND);
-#endif
-
 	pci_save_state(pdev);
 	pci_read_config_dword(pdev, 0x5C, &bsm);
 	dev_priv->saveBSM = bsm;
#1 lore raw
Quoted 1 line · Alan Cox

[Sits on top of Matthews opregion patch]

Hm, how am I going to apply this to the staging-next tree then?

Have a pointer to that patch, which I could cherry-pick into here to make it possible to apply this?

thanks,

greg k-h

#2 lore raw
Quoted 7 lines · On Mon, 28 Feb 2011 18:04:01 -0800 Greg KH <[email protected]> wrote:
Quoted 1 line · Alan Cox

[Sits on top of Matthews opregion patch]

Hm, how am I going to apply this to the staging-next tree then?

Have a pointer to that patch, which I could cherry-pick into here to make it possible to apply this?

I've no idea, we have two direct dependancies between the DRI API of the day and the driver.

Alan