summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2009-02-11 09:47:42 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2009-02-11 09:47:42 +0000
commit10f46e011775bec893f22ec88e7f4ee4acccb7db (patch)
tree3245c2fa5080131d23110e79c068b72c9c8198a6
parent0903f6a455ff194a49ebbdb6bf1a6c03eeb970a2 (diff)
downloadpoky-10f46e011775bec893f22ec88e7f4ee4acccb7db.tar.gz
linux-moblin: Cleanup patch whitespace
-rw-r--r--meta-moblin/packages/linux/linux-moblin-2.6.27/psb-driver.patch1149
-rw-r--r--meta-moblin/packages/linux/linux-moblin_2.6.27.bb2
2 files changed, 381 insertions, 770 deletions
diff --git a/meta-moblin/packages/linux/linux-moblin-2.6.27/psb-driver.patch b/meta-moblin/packages/linux/linux-moblin-2.6.27/psb-driver.patch
index adc33b492a..1ef6e378fe 100644
--- a/meta-moblin/packages/linux/linux-moblin-2.6.27/psb-driver.patch
+++ b/meta-moblin/packages/linux/linux-moblin-2.6.27/psb-driver.patch
@@ -1,7 +1,7 @@
1Index: linux-2.6.27/include/drm/drm.h 1Index: linux-2.6.27/include/drm/drm.h
2=================================================================== 2===================================================================
3--- linux-2.6.27.orig/include/drm/drm.h 2009-01-14 11:54:35.000000000 +0000 3--- linux-2.6.27.orig/include/drm/drm.h 2009-02-05 13:29:29.000000000 +0000
4+++ linux-2.6.27/include/drm/drm.h 2009-01-14 11:58:01.000000000 +0000 4+++ linux-2.6.27/include/drm/drm.h 2009-02-05 13:29:33.000000000 +0000
5@@ -173,6 +173,7 @@ 5@@ -173,6 +173,7 @@
6 _DRM_AGP = 3, /**< AGP/GART */ 6 _DRM_AGP = 3, /**< AGP/GART */
7 _DRM_SCATTER_GATHER = 4, /**< Scatter/gather memory for PCI DMA */ 7 _DRM_SCATTER_GATHER = 4, /**< Scatter/gather memory for PCI DMA */
@@ -380,7 +380,7 @@ Index: linux-2.6.27/include/drm/drm.h
380+ uint32_t value; 380+ uint32_t value;
381+ unsigned char name[DRM_PROP_NAME_LEN]; 381+ unsigned char name[DRM_PROP_NAME_LEN];
382+}; 382+};
383+ 383+
384+struct drm_mode_get_property { 384+struct drm_mode_get_property {
385+ 385+
386+ unsigned int prop_id; 386+ unsigned int prop_id;
@@ -473,8 +473,8 @@ Index: linux-2.6.27/include/drm/drm.h
473 #endif 473 #endif
474Index: linux-2.6.27/include/drm/drmP.h 474Index: linux-2.6.27/include/drm/drmP.h
475=================================================================== 475===================================================================
476--- linux-2.6.27.orig/include/drm/drmP.h 2009-01-14 11:54:35.000000000 +0000 476--- linux-2.6.27.orig/include/drm/drmP.h 2009-02-05 13:29:30.000000000 +0000
477+++ linux-2.6.27/include/drm/drmP.h 2009-01-14 11:58:31.000000000 +0000 477+++ linux-2.6.27/include/drm/drmP.h 2009-02-05 13:29:33.000000000 +0000
478@@ -57,6 +57,7 @@ 478@@ -57,6 +57,7 @@
479 #include <linux/dma-mapping.h> 479 #include <linux/dma-mapping.h>
480 #include <linux/mm.h> 480 #include <linux/mm.h>
@@ -738,8 +738,8 @@ Index: linux-2.6.27/include/drm/drmP.h
738 extern long drm_compat_ioctl(struct file *filp, 738 extern long drm_compat_ioctl(struct file *filp,
739Index: linux-2.6.27/include/drm/drm_pciids.h 739Index: linux-2.6.27/include/drm/drm_pciids.h
740=================================================================== 740===================================================================
741--- linux-2.6.27.orig/include/drm/drm_pciids.h 2009-01-14 11:54:35.000000000 +0000 741--- linux-2.6.27.orig/include/drm/drm_pciids.h 2008-10-09 23:13:53.000000000 +0100
742+++ linux-2.6.27/include/drm/drm_pciids.h 2009-01-14 11:58:01.000000000 +0000 742+++ linux-2.6.27/include/drm/drm_pciids.h 2009-02-05 13:29:33.000000000 +0000
743@@ -413,3 +413,9 @@ 743@@ -413,3 +413,9 @@
744 {0x8086, 0x2e12, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ 744 {0x8086, 0x2e12, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
745 {0x8086, 0x2e22, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \ 745 {0x8086, 0x2e22, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, \
@@ -752,8 +752,8 @@ Index: linux-2.6.27/include/drm/drm_pciids.h
752+ 752+
753Index: linux-2.6.27/drivers/gpu/drm/Makefile 753Index: linux-2.6.27/drivers/gpu/drm/Makefile
754=================================================================== 754===================================================================
755--- linux-2.6.27.orig/drivers/gpu/drm/Makefile 2009-01-14 11:54:35.000000000 +0000 755--- linux-2.6.27.orig/drivers/gpu/drm/Makefile 2009-02-05 13:29:29.000000000 +0000
756+++ linux-2.6.27/drivers/gpu/drm/Makefile 2009-01-14 12:11:06.000000000 +0000 756+++ linux-2.6.27/drivers/gpu/drm/Makefile 2009-02-05 13:29:33.000000000 +0000
757@@ -9,11 +9,14 @@ 757@@ -9,11 +9,14 @@
758 drm_drv.o drm_fops.o drm_gem.o drm_ioctl.o drm_irq.o \ 758 drm_drv.o drm_fops.o drm_gem.o drm_ioctl.o drm_irq.o \
759 drm_lock.o drm_memory.o drm_proc.o drm_stub.o drm_vm.o \ 759 drm_lock.o drm_memory.o drm_proc.o drm_stub.o drm_vm.o \
@@ -777,8 +777,8 @@ Index: linux-2.6.27/drivers/gpu/drm/Makefile
777- 777-
778Index: linux-2.6.27/drivers/gpu/drm/drm_agpsupport.c 778Index: linux-2.6.27/drivers/gpu/drm/drm_agpsupport.c
779=================================================================== 779===================================================================
780--- linux-2.6.27.orig/drivers/gpu/drm/drm_agpsupport.c 2009-01-14 11:54:35.000000000 +0000 780--- linux-2.6.27.orig/drivers/gpu/drm/drm_agpsupport.c 2009-02-05 13:29:29.000000000 +0000
781+++ linux-2.6.27/drivers/gpu/drm/drm_agpsupport.c 2009-01-14 11:58:01.000000000 +0000 781+++ linux-2.6.27/drivers/gpu/drm/drm_agpsupport.c 2009-02-05 13:29:33.000000000 +0000
782@@ -453,47 +453,158 @@ 782@@ -453,47 +453,158 @@
783 return agp_unbind_memory(handle); 783 return agp_unbind_memory(handle);
784 } 784 }
@@ -970,7 +970,7 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_agpsupport.c
970Index: linux-2.6.27/drivers/gpu/drm/drm_bo.c 970Index: linux-2.6.27/drivers/gpu/drm/drm_bo.c
971=================================================================== 971===================================================================
972--- /dev/null 1970-01-01 00:00:00.000000000 +0000 972--- /dev/null 1970-01-01 00:00:00.000000000 +0000
973+++ linux-2.6.27/drivers/gpu/drm/drm_bo.c 2009-01-14 11:58:01.000000000 +0000 973+++ linux-2.6.27/drivers/gpu/drm/drm_bo.c 2009-02-05 13:29:33.000000000 +0000
974@@ -0,0 +1,2660 @@ 974@@ -0,0 +1,2660 @@
975+/************************************************************************** 975+/**************************************************************************
976+ * 976+ *
@@ -1183,15 +1183,15 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_bo.c
1183+ struct drm_bo_mem_reg *old_mem = &bo->mem; 1183+ struct drm_bo_mem_reg *old_mem = &bo->mem;
1184+ uint64_t save_flags = old_mem->flags; 1184+ uint64_t save_flags = old_mem->flags;
1185+ uint64_t save_mask = old_mem->mask; 1185+ uint64_t save_mask = old_mem->mask;
1186+ 1186+
1187+ *old_mem = *mem; 1187+ *old_mem = *mem;
1188+ mem->mm_node = NULL; 1188+ mem->mm_node = NULL;
1189+ old_mem->mask = save_mask; 1189+ old_mem->mask = save_mask;
1190+ DRM_FLAG_MASKED(save_flags, mem->flags, 1190+ DRM_FLAG_MASKED(save_flags, mem->flags,
1191+ DRM_BO_MASK_MEMTYPE); 1191+ DRM_BO_MASK_MEMTYPE);
1192+ goto moved; 1192+ goto moved;
1193+ } 1193+ }
1194+ 1194+
1195+ } 1195+ }
1196+ 1196+
1197+ if (!(old_man->flags & _DRM_FLAG_MEMTYPE_FIXED) && 1197+ if (!(old_man->flags & _DRM_FLAG_MEMTYPE_FIXED) &&
@@ -1939,13 +1939,13 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_bo.c
1939+ DRM_ERROR("DRM_BO_FLAG_NO_EVICT is only available to priviliged processes.\n"); 1939+ DRM_ERROR("DRM_BO_FLAG_NO_EVICT is only available to priviliged processes.\n");
1940+ return -EPERM; 1940+ return -EPERM;
1941+ } 1941+ }
1942+ 1942+
1943+ if (likely(used_mask & DRM_BO_MASK_MEM) && 1943+ if (likely(used_mask & DRM_BO_MASK_MEM) &&
1944+ (bo->mem.flags & DRM_BO_FLAG_NO_EVICT) && 1944+ (bo->mem.flags & DRM_BO_FLAG_NO_EVICT) &&
1945+ !DRM_SUSER(DRM_CURPROC)) { 1945+ !DRM_SUSER(DRM_CURPROC)) {
1946+ if (likely(bo->mem.flags & new_flags & used_mask & 1946+ if (likely(bo->mem.flags & new_flags & used_mask &
1947+ DRM_BO_MASK_MEM)) 1947+ DRM_BO_MASK_MEM))
1948+ new_flags = (new_flags & ~DRM_BO_MASK_MEM) | 1948+ new_flags = (new_flags & ~DRM_BO_MASK_MEM) |
1949+ (bo->mem.flags & DRM_BO_MASK_MEM); 1949+ (bo->mem.flags & DRM_BO_MASK_MEM);
1950+ else { 1950+ else {
1951+ DRM_ERROR("Incompatible memory type specification " 1951+ DRM_ERROR("Incompatible memory type specification "
@@ -3635,7 +3635,7 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_bo.c
3635Index: linux-2.6.27/drivers/gpu/drm/drm_bo_lock.c 3635Index: linux-2.6.27/drivers/gpu/drm/drm_bo_lock.c
3636=================================================================== 3636===================================================================
3637--- /dev/null 1970-01-01 00:00:00.000000000 +0000 3637--- /dev/null 1970-01-01 00:00:00.000000000 +0000
3638+++ linux-2.6.27/drivers/gpu/drm/drm_bo_lock.c 2009-01-14 11:58:01.000000000 +0000 3638+++ linux-2.6.27/drivers/gpu/drm/drm_bo_lock.c 2009-02-05 13:29:33.000000000 +0000
3639@@ -0,0 +1,175 @@ 3639@@ -0,0 +1,175 @@
3640+/************************************************************************** 3640+/**************************************************************************
3641+ * 3641+ *
@@ -3815,7 +3815,7 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_bo_lock.c
3815Index: linux-2.6.27/drivers/gpu/drm/drm_bo_move.c 3815Index: linux-2.6.27/drivers/gpu/drm/drm_bo_move.c
3816=================================================================== 3816===================================================================
3817--- /dev/null 1970-01-01 00:00:00.000000000 +0000 3817--- /dev/null 1970-01-01 00:00:00.000000000 +0000
3818+++ linux-2.6.27/drivers/gpu/drm/drm_bo_move.c 2009-01-14 11:58:01.000000000 +0000 3818+++ linux-2.6.27/drivers/gpu/drm/drm_bo_move.c 2009-02-05 13:29:33.000000000 +0000
3819@@ -0,0 +1,597 @@ 3819@@ -0,0 +1,597 @@
3820+/************************************************************************** 3820+/**************************************************************************
3821+ * 3821+ *
@@ -4416,8 +4416,8 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_bo_move.c
4416+EXPORT_SYMBOL(drm_bo_kunmap); 4416+EXPORT_SYMBOL(drm_bo_kunmap);
4417Index: linux-2.6.27/drivers/gpu/drm/drm_bufs.c 4417Index: linux-2.6.27/drivers/gpu/drm/drm_bufs.c
4418=================================================================== 4418===================================================================
4419--- linux-2.6.27.orig/drivers/gpu/drm/drm_bufs.c 2009-01-14 11:54:35.000000000 +0000 4419--- linux-2.6.27.orig/drivers/gpu/drm/drm_bufs.c 2008-10-09 23:13:53.000000000 +0100
4420+++ linux-2.6.27/drivers/gpu/drm/drm_bufs.c 2009-01-14 11:58:01.000000000 +0000 4420+++ linux-2.6.27/drivers/gpu/drm/drm_bufs.c 2009-02-05 13:29:33.000000000 +0000
4421@@ -409,6 +409,7 @@ 4421@@ -409,6 +409,7 @@
4422 break; 4422 break;
4423 case _DRM_SHM: 4423 case _DRM_SHM:
@@ -4438,7 +4438,7 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_bufs.c
4438Index: linux-2.6.27/drivers/gpu/drm/drm_crtc.c 4438Index: linux-2.6.27/drivers/gpu/drm/drm_crtc.c
4439=================================================================== 4439===================================================================
4440--- /dev/null 1970-01-01 00:00:00.000000000 +0000 4440--- /dev/null 1970-01-01 00:00:00.000000000 +0000
4441+++ linux-2.6.27/drivers/gpu/drm/drm_crtc.c 2009-01-14 11:58:01.000000000 +0000 4441+++ linux-2.6.27/drivers/gpu/drm/drm_crtc.c 2009-02-05 13:29:33.000000000 +0000
4442@@ -0,0 +1,2170 @@ 4442@@ -0,0 +1,2170 @@
4443+/* 4443+/*
4444+ * Copyright (c) 2006-2007 Intel Corporation 4444+ * Copyright (c) 2006-2007 Intel Corporation
@@ -4502,7 +4502,7 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_crtc.c
4502+ 4502+
4503+ ret = idr_get_new_above(&dev->mode_config.crtc_idr, ptr, 1, &new_id); 4503+ ret = idr_get_new_above(&dev->mode_config.crtc_idr, ptr, 1, &new_id);
4504+ if (ret == -EAGAIN) 4504+ if (ret == -EAGAIN)
4505+ goto again; 4505+ goto again;
4506+ 4506+
4507+ return new_id; 4507+ return new_id;
4508+} 4508+}
@@ -4573,7 +4573,7 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_crtc.c
4573+ fb = kzalloc(sizeof(struct drm_framebuffer), GFP_KERNEL); 4573+ fb = kzalloc(sizeof(struct drm_framebuffer), GFP_KERNEL);
4574+ if (!fb) 4574+ if (!fb)
4575+ return NULL; 4575+ return NULL;
4576+ 4576+
4577+ fb->id = drm_idr_get(dev, fb); 4577+ fb->id = drm_idr_get(dev, fb);
4578+ fb->dev = dev; 4578+ fb->dev = dev;
4579+ dev->mode_config.num_fb++; 4579+ dev->mode_config.num_fb++;
@@ -4727,7 +4727,7 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_crtc.c
4727+ struct drm_output *output; 4727+ struct drm_output *output;
4728+ struct drm_display_mode *mode, *t; 4728+ struct drm_display_mode *mode, *t;
4729+ int ret; 4729+ int ret;
4730+ //if (maxX == 0 || maxY == 0) 4730+ //if (maxX == 0 || maxY == 0)
4731+ // TODO 4731+ // TODO
4732+ 4732+
4733+ list_for_each_entry(output, &dev->mode_config.output_list, head) { 4733+ list_for_each_entry(output, &dev->mode_config.output_list, head) {
@@ -4735,7 +4735,7 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_crtc.c
4735+ /* set all modes to the unverified state */ 4735+ /* set all modes to the unverified state */
4736+ list_for_each_entry_safe(mode, t, &output->modes, head) 4736+ list_for_each_entry_safe(mode, t, &output->modes, head)
4737+ mode->status = MODE_UNVERIFIED; 4737+ mode->status = MODE_UNVERIFIED;
4738+ 4738+
4739+ output->status = (*output->funcs->detect)(output); 4739+ output->status = (*output->funcs->detect)(output);
4740+ 4740+
4741+ if (output->status == output_status_disconnected) { 4741+ if (output->status == output_status_disconnected) {
@@ -4757,7 +4757,7 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_crtc.c
4757+ if (mode->status == MODE_OK) 4757+ if (mode->status == MODE_OK)
4758+ mode->status = (*output->funcs->mode_valid)(output,mode); 4758+ mode->status = (*output->funcs->mode_valid)(output,mode);
4759+ } 4759+ }
4760+ 4760+
4761+ 4761+
4762+ drm_mode_prune_invalid(dev, &output->modes, 1); 4762+ drm_mode_prune_invalid(dev, &output->modes, 1);
4763+ 4763+
@@ -4832,7 +4832,7 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_crtc.c
4832+ saved_mode = crtc->mode; 4832+ saved_mode = crtc->mode;
4833+ saved_x = crtc->x; 4833+ saved_x = crtc->x;
4834+ saved_y = crtc->y; 4834+ saved_y = crtc->y;
4835+ 4835+
4836+ /* Update crtc values up front so the driver can rely on them for mode 4836+ /* Update crtc values up front so the driver can rely on them for mode
4837+ * setting. 4837+ * setting.
4838+ */ 4838+ */
@@ -4841,21 +4841,21 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_crtc.c
4841+ crtc->y = y; 4841+ crtc->y = y;
4842+ 4842+
4843+ /* XXX short-circuit changes to base location only */ 4843+ /* XXX short-circuit changes to base location only */
4844+ 4844+
4845+ /* Pass our mode to the outputs and the CRTC to give them a chance to 4845+ /* Pass our mode to the outputs and the CRTC to give them a chance to
4846+ * adjust it according to limitations or output properties, and also 4846+ * adjust it according to limitations or output properties, and also
4847+ * a chance to reject the mode entirely. 4847+ * a chance to reject the mode entirely.
4848+ */ 4848+ */
4849+ list_for_each_entry(output, &dev->mode_config.output_list, head) { 4849+ list_for_each_entry(output, &dev->mode_config.output_list, head) {
4850+ 4850+
4851+ if (output->crtc != crtc) 4851+ if (output->crtc != crtc)
4852+ continue; 4852+ continue;
4853+ 4853+
4854+ if (!output->funcs->mode_fixup(output, mode, adjusted_mode)) { 4854+ if (!output->funcs->mode_fixup(output, mode, adjusted_mode)) {
4855+ goto done; 4855+ goto done;
4856+ } 4856+ }
4857+ } 4857+ }
4858+ 4858+
4859+ if (!crtc->funcs->mode_fixup(crtc, mode, adjusted_mode)) { 4859+ if (!crtc->funcs->mode_fixup(crtc, mode, adjusted_mode)) {
4860+ goto done; 4860+ goto done;
4861+ } 4861+ }
@@ -4865,13 +4865,13 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_crtc.c
4865+ 4865+
4866+ if (output->crtc != crtc) 4866+ if (output->crtc != crtc)
4867+ continue; 4867+ continue;
4868+ 4868+
4869+ /* Disable the output as the first thing we do. */ 4869+ /* Disable the output as the first thing we do. */
4870+ output->funcs->prepare(output); 4870+ output->funcs->prepare(output);
4871+ } 4871+ }
4872+ 4872+
4873+ crtc->funcs->prepare(crtc); 4873+ crtc->funcs->prepare(crtc);
4874+ 4874+
4875+ /* Set up the DPLL and any output state that needs to adjust or depend 4875+ /* Set up the DPLL and any output state that needs to adjust or depend
4876+ * on the DPLL. 4876+ * on the DPLL.
4877+ */ 4877+ */
@@ -4881,12 +4881,12 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_crtc.c
4881+ 4881+
4882+ if (output->crtc != crtc) 4882+ if (output->crtc != crtc)
4883+ continue; 4883+ continue;
4884+ 4884+
4885+ DRM_INFO("%s: set mode %s %x\n", output->name, mode->name, mode->mode_id); 4885+ DRM_INFO("%s: set mode %s %x\n", output->name, mode->name, mode->mode_id);
4886+ 4886+
4887+ output->funcs->mode_set(output, mode, adjusted_mode); 4887+ output->funcs->mode_set(output, mode, adjusted_mode);
4888+ } 4888+ }
4889+ 4889+
4890+ /* Now, enable the clocks, plane, pipe, and outputs that we set up. */ 4890+ /* Now, enable the clocks, plane, pipe, and outputs that we set up. */
4891+ crtc->funcs->commit(crtc); 4891+ crtc->funcs->commit(crtc);
4892+ 4892+
@@ -4894,7 +4894,7 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_crtc.c
4894+ 4894+
4895+ if (output->crtc != crtc) 4895+ if (output->crtc != crtc)
4896+ continue; 4896+ continue;
4897+ 4897+
4898+ output->funcs->commit(output); 4898+ output->funcs->commit(output);
4899+ 4899+
4900+#if 0 // TODO def RANDR_12_INTERFACE 4900+#if 0 // TODO def RANDR_12_INTERFACE
@@ -4902,7 +4902,7 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_crtc.c
4902+ RRPostPendingProperties (output->randr_output); 4902+ RRPostPendingProperties (output->randr_output);
4903+#endif 4903+#endif
4904+ } 4904+ }
4905+ 4905+
4906+ /* XXX free adjustedmode */ 4906+ /* XXX free adjustedmode */
4907+ drm_mode_destroy(dev, adjusted_mode); 4907+ drm_mode_destroy(dev, adjusted_mode);
4908+ ret = 1; 4908+ ret = 1;
@@ -4916,10 +4916,10 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_crtc.c
4916+ crtc->y = saved_y; 4916+ crtc->y = saved_y;
4917+ crtc->mode = saved_mode; 4917+ crtc->mode = saved_mode;
4918+ } 4918+ }
4919+ 4919+
4920+ if (didLock) 4920+ if (didLock)
4921+ crtc->funcs->unlock (crtc); 4921+ crtc->funcs->unlock (crtc);
4922+ 4922+
4923+ return ret; 4923+ return ret;
4924+} 4924+}
4925+EXPORT_SYMBOL(drm_crtc_set_mode); 4925+EXPORT_SYMBOL(drm_crtc_set_mode);
@@ -4958,7 +4958,7 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_crtc.c
4958+ * 4958+ *
4959+ * LOCKING: 4959+ * LOCKING:
4960+ * Caller must hold mode config lock. 4960+ * Caller must hold mode config lock.
4961+ * 4961+ *
4962+ * Add @mode to @output's mode list for later use. 4962+ * Add @mode to @output's mode list for later use.
4963+ */ 4963+ */
4964+void drm_mode_probed_add(struct drm_output *output, 4964+void drm_mode_probed_add(struct drm_output *output,
@@ -4975,7 +4975,7 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_crtc.c
4975+ * 4975+ *
4976+ * LOCKING: 4976+ * LOCKING:
4977+ * Caller must hold mode config lock. 4977+ * Caller must hold mode config lock.
4978+ * 4978+ *
4979+ * Remove @mode from @output's mode list, then free it. 4979+ * Remove @mode from @output's mode list, then free it.
4980+ */ 4980+ */
4981+void drm_mode_remove(struct drm_output *output, struct drm_display_mode *mode) 4981+void drm_mode_remove(struct drm_output *output, struct drm_display_mode *mode)
@@ -5009,7 +5009,7 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_crtc.c
5009+ output = kzalloc(sizeof(struct drm_output), GFP_KERNEL); 5009+ output = kzalloc(sizeof(struct drm_output), GFP_KERNEL);
5010+ if (!output) 5010+ if (!output)
5011+ return NULL; 5011+ return NULL;
5012+ 5012+
5013+ output->dev = dev; 5013+ output->dev = dev;
5014+ output->funcs = funcs; 5014+ output->funcs = funcs;
5015+ output->id = drm_idr_get(dev, output); 5015+ output->id = drm_idr_get(dev, output);
@@ -5197,7 +5197,7 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_crtc.c
5197+ ret = -EINVAL; 5197+ ret = -EINVAL;
5198+ goto out_err; 5198+ goto out_err;
5199+ } 5199+ }
5200+ 5200+
5201+ *bo = drm_user_object_entry(uo, struct drm_buffer_object, base); 5201+ *bo = drm_user_object_entry(uo, struct drm_buffer_object, base);
5202+ ret = 0; 5202+ ret = 0;
5203+out_err: 5203+out_err:
@@ -5228,7 +5228,7 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_crtc.c
5228+ 5228+
5229+ list_for_each_entry(output, &dev->mode_config.output_list, head) { 5229+ list_for_each_entry(output, &dev->mode_config.output_list, head) {
5230+ output->crtc = NULL; 5230+ output->crtc = NULL;
5231+ 5231+
5232+ /* Don't hook up outputs that are disconnected ?? 5232+ /* Don't hook up outputs that are disconnected ??
5233+ * 5233+ *
5234+ * This is debateable. Do we want fixed /dev/fbX or 5234+ * This is debateable. Do we want fixed /dev/fbX or
@@ -5280,7 +5280,7 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_crtc.c
5280+ c++; 5280+ c++;
5281+ if ((output->possible_crtcs & (1 << c)) == 0) 5281+ if ((output->possible_crtcs & (1 << c)) == 0)
5282+ continue; 5282+ continue;
5283+ 5283+
5284+ list_for_each_entry(output_equal, &dev->mode_config.output_list, head) { 5284+ list_for_each_entry(output_equal, &dev->mode_config.output_list, head) {
5285+ if (output->id == output_equal->id) 5285+ if (output->id == output_equal->id)
5286+ continue; 5286+ continue;
@@ -5368,7 +5368,7 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_crtc.c
5368+ dev->driver->fb_probe(dev, crtc); 5368+ dev->driver->fb_probe(dev, crtc);
5369+ } 5369+ }
5370+ 5370+
5371+ /* This is a little screwy, as we've already walked the outputs 5371+ /* This is a little screwy, as we've already walked the outputs
5372+ * above, but it's a little bit of magic too. There's the potential 5372+ * above, but it's a little bit of magic too. There's the potential
5373+ * for things not to get setup above if an existing device gets 5373+ * for things not to get setup above if an existing device gets
5374+ * re-assigned thus confusing the hardware. By walking the outputs 5374+ * re-assigned thus confusing the hardware. By walking the outputs
@@ -5583,7 +5583,7 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_crtc.c
5583+ strncpy(out->name, in->name, DRM_DISPLAY_MODE_LEN); 5583+ strncpy(out->name, in->name, DRM_DISPLAY_MODE_LEN);
5584+ out->name[DRM_DISPLAY_MODE_LEN-1] = 0; 5584+ out->name[DRM_DISPLAY_MODE_LEN-1] = 0;
5585+} 5585+}
5586+ 5586+
5587+/** 5587+/**
5588+ * drm_mode_getresources - get graphics configuration 5588+ * drm_mode_getresources - get graphics configuration
5589+ * @inode: inode from the ioctl 5589+ * @inode: inode from the ioctl
@@ -5687,7 +5687,7 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_crtc.c
5687+ } 5687+ }
5688+ } 5688+ }
5689+ card_res->count_outputs = output_count; 5689+ card_res->count_outputs = output_count;
5690+ 5690+
5691+ /* Modes */ 5691+ /* Modes */
5692+ if (card_res->count_modes >= mode_count) { 5692+ if (card_res->count_modes >= mode_count) {
5693+ copied = 0; 5693+ copied = 0;
@@ -5715,7 +5715,7 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_crtc.c
5715+ DRM_DEBUG("Counted %d %d %d\n", card_res->count_crtcs, 5715+ DRM_DEBUG("Counted %d %d %d\n", card_res->count_crtcs,
5716+ card_res->count_outputs, 5716+ card_res->count_outputs,
5717+ card_res->count_modes); 5717+ card_res->count_modes);
5718+ 5718+
5719+ mutex_unlock(&dev->mode_config.mutex); 5719+ mutex_unlock(&dev->mode_config.mutex);
5720+ return ret; 5720+ return ret;
5721+} 5721+}
@@ -5819,7 +5819,7 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_crtc.c
5819+ 5819+
5820+ list_for_each_entry(mode, &output->modes, head) 5820+ list_for_each_entry(mode, &output->modes, head)
5821+ mode_count++; 5821+ mode_count++;
5822+ 5822+
5823+ for (i = 0; i < DRM_OUTPUT_MAX_UMODES; i++) 5823+ for (i = 0; i < DRM_OUTPUT_MAX_UMODES; i++)
5824+ if (output->user_mode_ids[i] != 0) 5824+ if (output->user_mode_ids[i] != 0)
5825+ mode_count++; 5825+ mode_count++;
@@ -5933,13 +5933,13 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_crtc.c
5933+ mode = idr_find(&dev->mode_config.crtc_idr, crtc_req->mode); 5933+ mode = idr_find(&dev->mode_config.crtc_idr, crtc_req->mode);
5934+ if (!mode || (mode->mode_id != crtc_req->mode)) { 5934+ if (!mode || (mode->mode_id != crtc_req->mode)) {
5935+ struct drm_output *output; 5935+ struct drm_output *output;
5936+ 5936+
5937+ list_for_each_entry(output, 5937+ list_for_each_entry(output,
5938+ &dev->mode_config.output_list, 5938+ &dev->mode_config.output_list,
5939+ head) { 5939+ head) {
5940+ list_for_each_entry(mode, &output->modes, 5940+ list_for_each_entry(mode, &output->modes,
5941+ head) { 5941+ head) {
5942+ drm_mode_debug_printmodeline(dev, 5942+ drm_mode_debug_printmodeline(dev,
5943+ mode); 5943+ mode);
5944+ } 5944+ }
5945+ } 5945+ }
@@ -5988,7 +5988,7 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_crtc.c
5988+ output_set[i] = output; 5988+ output_set[i] = output;
5989+ } 5989+ }
5990+ } 5990+ }
5991+ 5991+
5992+ ret = drm_crtc_set_config(crtc, crtc_req, mode, output_set, fb); 5992+ ret = drm_crtc_set_config(crtc, crtc_req, mode, output_set, fb);
5993+ 5993+
5994+out: 5994+out:
@@ -6349,7 +6349,7 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_crtc.c
6349+ struct drm_display_mode *mode; 6349+ struct drm_display_mode *mode;
6350+ int ret = -EINVAL; 6350+ int ret = -EINVAL;
6351+ 6351+
6352+ mutex_lock(&dev->mode_config.mutex); 6352+ mutex_lock(&dev->mode_config.mutex);
6353+ mode = idr_find(&dev->mode_config.crtc_idr, *id); 6353+ mode = idr_find(&dev->mode_config.crtc_idr, *id);
6354+ if (!mode || (*id != mode->mode_id)) { 6354+ if (!mode || (*id != mode->mode_id)) {
6355+ goto out; 6355+ goto out;
@@ -6448,7 +6448,7 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_crtc.c
6448+ 6448+
6449+ 6449+
6450+ ret = drm_mode_detachmode(dev, output, mode); 6450+ ret = drm_mode_detachmode(dev, output, mode);
6451+out: 6451+out:
6452+ mutex_unlock(&dev->mode_config.mutex); 6452+ mutex_unlock(&dev->mode_config.mutex);
6453+ return ret; 6453+ return ret;
6454+} 6454+}
@@ -6461,7 +6461,7 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_crtc.c
6461+ property = kzalloc(sizeof(struct drm_output), GFP_KERNEL); 6461+ property = kzalloc(sizeof(struct drm_output), GFP_KERNEL);
6462+ if (!property) 6462+ if (!property)
6463+ return NULL; 6463+ return NULL;
6464+ 6464+
6465+ property->values = kzalloc(sizeof(uint32_t)*num_values, GFP_KERNEL); 6465+ property->values = kzalloc(sizeof(uint32_t)*num_values, GFP_KERNEL);
6466+ if (!property->values) 6466+ if (!property->values)
6467+ goto fail; 6467+ goto fail;
@@ -6493,7 +6493,7 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_crtc.c
6493+ if (!list_empty(&property->enum_list)) { 6493+ if (!list_empty(&property->enum_list)) {
6494+ list_for_each_entry(prop_enum, &property->enum_list, head) { 6494+ list_for_each_entry(prop_enum, &property->enum_list, head) {
6495+ if (prop_enum->value == value) { 6495+ if (prop_enum->value == value) {
6496+ strncpy(prop_enum->name, name, DRM_PROP_NAME_LEN); 6496+ strncpy(prop_enum->name, name, DRM_PROP_NAME_LEN);
6497+ prop_enum->name[DRM_PROP_NAME_LEN-1] = '\0'; 6497+ prop_enum->name[DRM_PROP_NAME_LEN-1] = '\0';
6498+ return 0; 6498+ return 0;
6499+ } 6499+ }
@@ -6504,7 +6504,7 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_crtc.c
6504+ if (!prop_enum) 6504+ if (!prop_enum)
6505+ return -ENOMEM; 6505+ return -ENOMEM;
6506+ 6506+
6507+ strncpy(prop_enum->name, name, DRM_PROP_NAME_LEN); 6507+ strncpy(prop_enum->name, name, DRM_PROP_NAME_LEN);
6508+ prop_enum->name[DRM_PROP_NAME_LEN-1] = '\0'; 6508+ prop_enum->name[DRM_PROP_NAME_LEN-1] = '\0';
6509+ prop_enum->value = value; 6509+ prop_enum->value = value;
6510+ 6510+
@@ -6526,7 +6526,7 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_crtc.c
6526+ kfree(property->values); 6526+ kfree(property->values);
6527+ drm_idr_put(dev, property->id); 6527+ drm_idr_put(dev, property->id);
6528+ list_del(&property->head); 6528+ list_del(&property->head);
6529+ kfree(property); 6529+ kfree(property);
6530+} 6530+}
6531+EXPORT_SYMBOL(drm_property_destroy); 6531+EXPORT_SYMBOL(drm_property_destroy);
6532+ 6532+
@@ -6612,8 +6612,8 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_crtc.c
6612+} 6612+}
6613Index: linux-2.6.27/drivers/gpu/drm/drm_drv.c 6613Index: linux-2.6.27/drivers/gpu/drm/drm_drv.c
6614=================================================================== 6614===================================================================
6615--- linux-2.6.27.orig/drivers/gpu/drm/drm_drv.c 2009-01-14 11:54:35.000000000 +0000 6615--- linux-2.6.27.orig/drivers/gpu/drm/drm_drv.c 2009-02-05 13:29:29.000000000 +0000
6616+++ linux-2.6.27/drivers/gpu/drm/drm_drv.c 2009-01-14 11:58:01.000000000 +0000 6616+++ linux-2.6.27/drivers/gpu/drm/drm_drv.c 2009-02-05 13:29:33.000000000 +0000
6617@@ -49,6 +49,9 @@ 6617@@ -49,6 +49,9 @@
6618 #include "drmP.h" 6618 #include "drmP.h"
6619 #include "drm_core.h" 6619 #include "drm_core.h"
@@ -6833,7 +6833,7 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_drv.c
6833Index: linux-2.6.27/drivers/gpu/drm/drm_edid.c 6833Index: linux-2.6.27/drivers/gpu/drm/drm_edid.c
6834=================================================================== 6834===================================================================
6835--- /dev/null 1970-01-01 00:00:00.000000000 +0000 6835--- /dev/null 1970-01-01 00:00:00.000000000 +0000
6836+++ linux-2.6.27/drivers/gpu/drm/drm_edid.c 2009-01-14 11:58:01.000000000 +0000 6836+++ linux-2.6.27/drivers/gpu/drm/drm_edid.c 2009-02-05 13:29:33.000000000 +0000
6837@@ -0,0 +1,519 @@ 6837@@ -0,0 +1,519 @@
6838+/* 6838+/*
6839+ * Copyright (c) 2007 Intel Corporation 6839+ * Copyright (c) 2007 Intel Corporation
@@ -7157,7 +7157,7 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_edid.c
7157+ if (i == 0 && edid->preferred_timing) 7157+ if (i == 0 && edid->preferred_timing)
7158+ newmode->type |= DRM_MODE_TYPE_PREFERRED; 7158+ newmode->type |= DRM_MODE_TYPE_PREFERRED;
7159+ drm_mode_probed_add(output, newmode); 7159+ drm_mode_probed_add(output, newmode);
7160+ 7160+
7161+ modes++; 7161+ modes++;
7162+ continue; 7162+ continue;
7163+ } 7163+ }
@@ -7303,7 +7303,7 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_edid.c
7303+ * @adapter: i2c adapter to use for DDC 7303+ * @adapter: i2c adapter to use for DDC
7304+ * 7304+ *
7305+ * Poke the given output's i2c channel to grab EDID data if possible. 7305+ * Poke the given output's i2c channel to grab EDID data if possible.
7306+ * 7306+ *
7307+ * Return edid data or NULL if we couldn't find any. 7307+ * Return edid data or NULL if we couldn't find any.
7308+ */ 7308+ */
7309+struct edid *drm_get_edid(struct drm_output *output, 7309+struct edid *drm_get_edid(struct drm_output *output,
@@ -7357,7 +7357,7 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_edid.c
7357Index: linux-2.6.27/drivers/gpu/drm/drm_fence.c 7357Index: linux-2.6.27/drivers/gpu/drm/drm_fence.c
7358=================================================================== 7358===================================================================
7359--- /dev/null 1970-01-01 00:00:00.000000000 +0000 7359--- /dev/null 1970-01-01 00:00:00.000000000 +0000
7360+++ linux-2.6.27/drivers/gpu/drm/drm_fence.c 2009-01-14 11:58:01.000000000 +0000 7360+++ linux-2.6.27/drivers/gpu/drm/drm_fence.c 2009-02-05 13:29:33.000000000 +0000
7361@@ -0,0 +1,829 @@ 7361@@ -0,0 +1,829 @@
7362+/************************************************************************** 7362+/**************************************************************************
7363+ * 7363+ *
@@ -7398,7 +7398,7 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_fence.c
7398+ */ 7398+ */
7399+ 7399+
7400+int drm_fence_wait_polling(struct drm_fence_object *fence, int lazy, 7400+int drm_fence_wait_polling(struct drm_fence_object *fence, int lazy,
7401+ int interruptible, uint32_t mask, 7401+ int interruptible, uint32_t mask,
7402+ unsigned long end_jiffies) 7402+ unsigned long end_jiffies)
7403+{ 7403+{
7404+ struct drm_device *dev = fence->dev; 7404+ struct drm_device *dev = fence->dev;
@@ -7411,9 +7411,9 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_fence.c
7411+ add_wait_queue(&fc->fence_queue, &entry); 7411+ add_wait_queue(&fc->fence_queue, &entry);
7412+ 7412+
7413+ ret = 0; 7413+ ret = 0;
7414+ 7414+
7415+ for (;;) { 7415+ for (;;) {
7416+ __set_current_state((interruptible) ? 7416+ __set_current_state((interruptible) ?
7417+ TASK_INTERRUPTIBLE : 7417+ TASK_INTERRUPTIBLE :
7418+ TASK_UNINTERRUPTIBLE); 7418+ TASK_UNINTERRUPTIBLE);
7419+ if (drm_fence_object_signaled(fence, mask)) 7419+ if (drm_fence_object_signaled(fence, mask))
@@ -7427,10 +7427,10 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_fence.c
7427+ else if ((++count & 0x0F) == 0){ 7427+ else if ((++count & 0x0F) == 0){
7428+ __set_current_state(TASK_RUNNING); 7428+ __set_current_state(TASK_RUNNING);
7429+ schedule(); 7429+ schedule();
7430+ __set_current_state((interruptible) ? 7430+ __set_current_state((interruptible) ?
7431+ TASK_INTERRUPTIBLE : 7431+ TASK_INTERRUPTIBLE :
7432+ TASK_UNINTERRUPTIBLE); 7432+ TASK_UNINTERRUPTIBLE);
7433+ } 7433+ }
7434+ if (interruptible && signal_pending(current)) { 7434+ if (interruptible && signal_pending(current)) {
7435+ ret = -EAGAIN; 7435+ ret = -EAGAIN;
7436+ break; 7436+ break;
@@ -7527,12 +7527,12 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_fence.c
7527+ driver->sequence_mask; 7527+ driver->sequence_mask;
7528+ if (diff > driver->wrap_diff) 7528+ if (diff > driver->wrap_diff)
7529+ break; 7529+ break;
7530+ 7530+
7531+ fc->waiting_types |= fence->waiting_types & ~fence->signaled_types; 7531+ fc->waiting_types |= fence->waiting_types & ~fence->signaled_types;
7532+ } 7532+ }
7533+ } 7533+ }
7534+ 7534+
7535+ if (wake) 7535+ if (wake)
7536+ wake_up_all(&fc->fence_queue); 7536+ wake_up_all(&fc->fence_queue);
7537+} 7537+}
7538+EXPORT_SYMBOL(drm_fence_handler); 7538+EXPORT_SYMBOL(drm_fence_handler);
@@ -7621,7 +7621,7 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_fence.c
7621+ struct drm_device *dev = fence->dev; 7621+ struct drm_device *dev = fence->dev;
7622+ struct drm_fence_manager *fm = &dev->fm; 7622+ struct drm_fence_manager *fm = &dev->fm;
7623+ struct drm_fence_driver *driver = dev->driver->fence_driver; 7623+ struct drm_fence_driver *driver = dev->driver->fence_driver;
7624+ 7624+
7625+ mask &= fence->type; 7625+ mask &= fence->type;
7626+ read_lock_irqsave(&fm->lock, flags); 7626+ read_lock_irqsave(&fm->lock, flags);
7627+ signaled = (mask & fence->signaled_types) == mask; 7627+ signaled = (mask & fence->signaled_types) == mask;
@@ -7658,7 +7658,7 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_fence.c
7658+ write_lock_irqsave(&fm->lock, irq_flags); 7658+ write_lock_irqsave(&fm->lock, irq_flags);
7659+ fence->waiting_types |= type; 7659+ fence->waiting_types |= type;
7660+ fc->waiting_types |= fence->waiting_types; 7660+ fc->waiting_types |= fence->waiting_types;
7661+ diff = (fence->sequence - fc->highest_waiting_sequence) & 7661+ diff = (fence->sequence - fc->highest_waiting_sequence) &
7662+ driver->sequence_mask; 7662+ driver->sequence_mask;
7663+ 7663+
7664+ if (diff < driver->wrap_diff) 7664+ if (diff < driver->wrap_diff)
@@ -7670,7 +7670,7 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_fence.c
7670+ */ 7670+ */
7671+ 7671+
7672+ saved_pending_flush = fc->pending_flush; 7672+ saved_pending_flush = fc->pending_flush;
7673+ if (driver->needed_flush) 7673+ if (driver->needed_flush)
7674+ fc->pending_flush |= driver->needed_flush(fence); 7674+ fc->pending_flush |= driver->needed_flush(fence);
7675+ 7675+
7676+ if (driver->poll) 7676+ if (driver->poll)
@@ -7709,14 +7709,14 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_fence.c
7709+ diff = (sequence - fence->sequence) & driver->sequence_mask; 7709+ diff = (sequence - fence->sequence) & driver->sequence_mask;
7710+ if (diff <= driver->flush_diff) 7710+ if (diff <= driver->flush_diff)
7711+ break; 7711+ break;
7712+ 7712+
7713+ fence->waiting_types = fence->type; 7713+ fence->waiting_types = fence->type;
7714+ fc->waiting_types |= fence->type; 7714+ fc->waiting_types |= fence->type;
7715+ 7715+
7716+ if (driver->needed_flush) 7716+ if (driver->needed_flush)
7717+ fc->pending_flush |= driver->needed_flush(fence); 7717+ fc->pending_flush |= driver->needed_flush(fence);
7718+ } 7718+ }
7719+ 7719+
7720+ if (driver->poll) 7720+ if (driver->poll)
7721+ driver->poll(dev, fence_class, fc->waiting_types); 7721+ driver->poll(dev, fence_class, fc->waiting_types);
7722+ 7722+
@@ -7758,13 +7758,13 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_fence.c
7758+ if (driver->has_irq(dev, fence->fence_class, mask)) { 7758+ if (driver->has_irq(dev, fence->fence_class, mask)) {
7759+ if (!ignore_signals) 7759+ if (!ignore_signals)
7760+ ret = wait_event_interruptible_timeout 7760+ ret = wait_event_interruptible_timeout
7761+ (fc->fence_queue, 7761+ (fc->fence_queue,
7762+ drm_fence_object_signaled(fence, mask), 7762+ drm_fence_object_signaled(fence, mask),
7763+ 3 * DRM_HZ); 7763+ 3 * DRM_HZ);
7764+ else 7764+ else
7765+ ret = wait_event_timeout 7765+ ret = wait_event_timeout
7766+ (fc->fence_queue, 7766+ (fc->fence_queue,
7767+ drm_fence_object_signaled(fence, mask), 7767+ drm_fence_object_signaled(fence, mask),
7768+ 3 * DRM_HZ); 7768+ 3 * DRM_HZ);
7769+ 7769+
7770+ if (unlikely(ret == -ERESTARTSYS)) 7770+ if (unlikely(ret == -ERESTARTSYS))
@@ -8190,8 +8190,8 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_fence.c
8190+} 8190+}
8191Index: linux-2.6.27/drivers/gpu/drm/drm_fops.c 8191Index: linux-2.6.27/drivers/gpu/drm/drm_fops.c
8192=================================================================== 8192===================================================================
8193--- linux-2.6.27.orig/drivers/gpu/drm/drm_fops.c 2009-01-14 11:54:35.000000000 +0000 8193--- linux-2.6.27.orig/drivers/gpu/drm/drm_fops.c 2009-02-05 13:29:29.000000000 +0000
8194+++ linux-2.6.27/drivers/gpu/drm/drm_fops.c 2009-01-14 11:58:01.000000000 +0000 8194+++ linux-2.6.27/drivers/gpu/drm/drm_fops.c 2009-02-05 13:29:33.000000000 +0000
8195@@ -231,6 +231,7 @@ 8195@@ -231,6 +231,7 @@
8196 int minor_id = iminor(inode); 8196 int minor_id = iminor(inode);
8197 struct drm_file *priv; 8197 struct drm_file *priv;
@@ -8279,8 +8279,8 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_fops.c
8279 8279
8280Index: linux-2.6.27/drivers/gpu/drm/drm_hashtab.c 8280Index: linux-2.6.27/drivers/gpu/drm/drm_hashtab.c
8281=================================================================== 8281===================================================================
8282--- linux-2.6.27.orig/drivers/gpu/drm/drm_hashtab.c 2009-01-14 11:54:35.000000000 +0000 8282--- linux-2.6.27.orig/drivers/gpu/drm/drm_hashtab.c 2008-10-09 23:13:53.000000000 +0100
8283+++ linux-2.6.27/drivers/gpu/drm/drm_hashtab.c 2009-01-14 11:58:01.000000000 +0000 8283+++ linux-2.6.27/drivers/gpu/drm/drm_hashtab.c 2009-02-05 13:29:33.000000000 +0000
8284@@ -29,7 +29,7 @@ 8284@@ -29,7 +29,7 @@
8285 * Simple open hash tab implementation. 8285 * Simple open hash tab implementation.
8286 * 8286 *
@@ -8292,8 +8292,8 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_hashtab.c
8292 #include "drmP.h" 8292 #include "drmP.h"
8293Index: linux-2.6.27/drivers/gpu/drm/drm_irq.c 8293Index: linux-2.6.27/drivers/gpu/drm/drm_irq.c
8294=================================================================== 8294===================================================================
8295--- linux-2.6.27.orig/drivers/gpu/drm/drm_irq.c 2009-01-14 11:54:35.000000000 +0000 8295--- linux-2.6.27.orig/drivers/gpu/drm/drm_irq.c 2009-02-05 13:29:29.000000000 +0000
8296+++ linux-2.6.27/drivers/gpu/drm/drm_irq.c 2009-01-14 11:58:01.000000000 +0000 8296+++ linux-2.6.27/drivers/gpu/drm/drm_irq.c 2009-02-05 13:29:33.000000000 +0000
8297@@ -70,6 +70,7 @@ 8297@@ -70,6 +70,7 @@
8298 8298
8299 return 0; 8299 return 0;
@@ -8737,8 +8737,8 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_irq.c
8737 * Tasklet wrapper function. 8737 * Tasklet wrapper function.
8738Index: linux-2.6.27/drivers/gpu/drm/drm_mm.c 8738Index: linux-2.6.27/drivers/gpu/drm/drm_mm.c
8739=================================================================== 8739===================================================================
8740--- linux-2.6.27.orig/drivers/gpu/drm/drm_mm.c 2009-01-14 11:54:35.000000000 +0000 8740--- linux-2.6.27.orig/drivers/gpu/drm/drm_mm.c 2009-02-05 13:29:29.000000000 +0000
8741+++ linux-2.6.27/drivers/gpu/drm/drm_mm.c 2009-01-14 11:58:01.000000000 +0000 8741+++ linux-2.6.27/drivers/gpu/drm/drm_mm.c 2009-02-05 13:29:33.000000000 +0000
8742@@ -38,7 +38,7 @@ 8742@@ -38,7 +38,7 @@
8743 * Aligned allocations can also see improvement. 8743 * Aligned allocations can also see improvement.
8744 * 8744 *
@@ -8751,7 +8751,7 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_mm.c
8751Index: linux-2.6.27/drivers/gpu/drm/drm_modes.c 8751Index: linux-2.6.27/drivers/gpu/drm/drm_modes.c
8752=================================================================== 8752===================================================================
8753--- /dev/null 1970-01-01 00:00:00.000000000 +0000 8753--- /dev/null 1970-01-01 00:00:00.000000000 +0000
8754+++ linux-2.6.27/drivers/gpu/drm/drm_modes.c 2009-01-14 11:58:01.000000000 +0000 8754+++ linux-2.6.27/drivers/gpu/drm/drm_modes.c 2009-02-05 13:29:33.000000000 +0000
8755@@ -0,0 +1,560 @@ 8755@@ -0,0 +1,560 @@
8756+/* 8756+/*
8757+ * Copyright © 1997-2003 by The XFree86 Project, Inc. 8757+ * Copyright © 1997-2003 by The XFree86 Project, Inc.
@@ -8927,7 +8927,7 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_modes.c
8927+ return refresh; 8927+ return refresh;
8928+} 8928+}
8929+EXPORT_SYMBOL(drm_mode_vrefresh); 8929+EXPORT_SYMBOL(drm_mode_vrefresh);
8930+ 8930+
8931+/** 8931+/**
8932+ * drm_mode_set_crtcinfo - set CRTC modesetting parameters 8932+ * drm_mode_set_crtcinfo - set CRTC modesetting parameters
8933+ * @p: mode 8933+ * @p: mode
@@ -9045,7 +9045,7 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_modes.c
9045+ mode1->vscan == mode2->vscan && 9045+ mode1->vscan == mode2->vscan &&
9046+ mode1->flags == mode2->flags) 9046+ mode1->flags == mode2->flags)
9047+ return true; 9047+ return true;
9048+ 9048+
9049+ return false; 9049+ return false;
9050+} 9050+}
9051+EXPORT_SYMBOL(drm_mode_equal); 9051+EXPORT_SYMBOL(drm_mode_equal);
@@ -9074,7 +9074,7 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_modes.c
9074+ list_for_each_entry(mode, mode_list, head) { 9074+ list_for_each_entry(mode, mode_list, head) {
9075+ if (maxPitch > 0 && mode->hdisplay > maxPitch) 9075+ if (maxPitch > 0 && mode->hdisplay > maxPitch)
9076+ mode->status = MODE_BAD_WIDTH; 9076+ mode->status = MODE_BAD_WIDTH;
9077+ 9077+
9078+ if (maxX > 0 && mode->hdisplay > maxX) 9078+ if (maxX > 0 && mode->hdisplay > maxX)
9079+ mode->status = MODE_VIRTUAL_X; 9079+ mode->status = MODE_VIRTUAL_X;
9080+ 9080+
@@ -9189,7 +9189,7 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_modes.c
9189+{ 9189+{
9190+ struct list_head *p, *q, *e, *list, *tail, *oldhead; 9190+ struct list_head *p, *q, *e, *list, *tail, *oldhead;
9191+ int insize, nmerges, psize, qsize, i; 9191+ int insize, nmerges, psize, qsize, i;
9192+ 9192+
9193+ list = head->next; 9193+ list = head->next;
9194+ list_del(head); 9194+ list_del(head);
9195+ insize = 1; 9195+ insize = 1;
@@ -9197,7 +9197,7 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_modes.c
9197+ p = oldhead = list; 9197+ p = oldhead = list;
9198+ list = tail = NULL; 9198+ list = tail = NULL;
9199+ nmerges = 0; 9199+ nmerges = 0;
9200+ 9200+
9201+ while (p) { 9201+ while (p) {
9202+ nmerges++; 9202+ nmerges++;
9203+ q = p; 9203+ q = p;
@@ -9208,7 +9208,7 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_modes.c
9208+ if (!q) 9208+ if (!q)
9209+ break; 9209+ break;
9210+ } 9210+ }
9211+ 9211+
9212+ qsize = insize; 9212+ qsize = insize;
9213+ while (psize > 0 || (qsize > 0 && q)) { 9213+ while (psize > 0 || (qsize > 0 && q)) {
9214+ if (!psize) { 9214+ if (!psize) {
@@ -9245,16 +9245,16 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_modes.c
9245+ } 9245+ }
9246+ p = q; 9246+ p = q;
9247+ } 9247+ }
9248+ 9248+
9249+ tail->next = list; 9249+ tail->next = list;
9250+ list->prev = tail; 9250+ list->prev = tail;
9251+ 9251+
9252+ if (nmerges <= 1) 9252+ if (nmerges <= 1)
9253+ break; 9253+ break;
9254+ 9254+
9255+ insize *= 2; 9255+ insize *= 2;
9256+ } 9256+ }
9257+ 9257+
9258+ head->next = list; 9258+ head->next = list;
9259+ head->prev = list->prev; 9259+ head->prev = list->prev;
9260+ list->prev->next = head; 9260+ list->prev->next = head;
@@ -9316,7 +9316,7 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_modes.c
9316Index: linux-2.6.27/drivers/gpu/drm/drm_object.c 9316Index: linux-2.6.27/drivers/gpu/drm/drm_object.c
9317=================================================================== 9317===================================================================
9318--- /dev/null 1970-01-01 00:00:00.000000000 +0000 9318--- /dev/null 1970-01-01 00:00:00.000000000 +0000
9319+++ linux-2.6.27/drivers/gpu/drm/drm_object.c 2009-01-14 11:58:01.000000000 +0000 9319+++ linux-2.6.27/drivers/gpu/drm/drm_object.c 2009-02-05 13:29:33.000000000 +0000
9320@@ -0,0 +1,294 @@ 9320@@ -0,0 +1,294 @@
9321+/************************************************************************** 9321+/**************************************************************************
9322+ * 9322+ *
@@ -9615,7 +9615,7 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_object.c
9615Index: linux-2.6.27/drivers/gpu/drm/drm_regman.c 9615Index: linux-2.6.27/drivers/gpu/drm/drm_regman.c
9616=================================================================== 9616===================================================================
9617--- /dev/null 1970-01-01 00:00:00.000000000 +0000 9617--- /dev/null 1970-01-01 00:00:00.000000000 +0000
9618+++ linux-2.6.27/drivers/gpu/drm/drm_regman.c 2009-01-14 11:58:01.000000000 +0000 9618+++ linux-2.6.27/drivers/gpu/drm/drm_regman.c 2009-02-05 13:29:33.000000000 +0000
9619@@ -0,0 +1,200 @@ 9619@@ -0,0 +1,200 @@
9620+/************************************************************************** 9620+/**************************************************************************
9621+ * Copyright (c) 2007 Tungsten Graphics, Inc., Cedar Park, TX., USA 9621+ * Copyright (c) 2007 Tungsten Graphics, Inc., Cedar Park, TX., USA
@@ -9819,8 +9819,8 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_regman.c
9819+EXPORT_SYMBOL(drm_regs_init); 9819+EXPORT_SYMBOL(drm_regs_init);
9820Index: linux-2.6.27/drivers/gpu/drm/drm_sman.c 9820Index: linux-2.6.27/drivers/gpu/drm/drm_sman.c
9821=================================================================== 9821===================================================================
9822--- linux-2.6.27.orig/drivers/gpu/drm/drm_sman.c 2009-01-14 11:54:35.000000000 +0000 9822--- linux-2.6.27.orig/drivers/gpu/drm/drm_sman.c 2008-10-09 23:13:53.000000000 +0100
9823+++ linux-2.6.27/drivers/gpu/drm/drm_sman.c 2009-01-14 11:58:01.000000000 +0000 9823+++ linux-2.6.27/drivers/gpu/drm/drm_sman.c 2009-02-05 13:29:33.000000000 +0000
9824@@ -33,7 +33,7 @@ 9824@@ -33,7 +33,7 @@
9825 * struct or a context identifier. 9825 * struct or a context identifier.
9826 * 9826 *
@@ -9832,8 +9832,8 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_sman.c
9832 #include "drm_sman.h" 9832 #include "drm_sman.h"
9833Index: linux-2.6.27/drivers/gpu/drm/drm_stub.c 9833Index: linux-2.6.27/drivers/gpu/drm/drm_stub.c
9834=================================================================== 9834===================================================================
9835--- linux-2.6.27.orig/drivers/gpu/drm/drm_stub.c 2009-01-14 11:54:35.000000000 +0000 9835--- linux-2.6.27.orig/drivers/gpu/drm/drm_stub.c 2009-02-05 13:29:29.000000000 +0000
9836+++ linux-2.6.27/drivers/gpu/drm/drm_stub.c 2009-01-14 11:58:01.000000000 +0000 9836+++ linux-2.6.27/drivers/gpu/drm/drm_stub.c 2009-02-05 13:29:33.000000000 +0000
9837@@ -97,6 +97,7 @@ 9837@@ -97,6 +97,7 @@
9838 init_timer(&dev->timer); 9838 init_timer(&dev->timer);
9839 mutex_init(&dev->struct_mutex); 9839 mutex_init(&dev->struct_mutex);
@@ -9890,7 +9890,7 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_stub.c
9890Index: linux-2.6.27/drivers/gpu/drm/drm_ttm.c 9890Index: linux-2.6.27/drivers/gpu/drm/drm_ttm.c
9891=================================================================== 9891===================================================================
9892--- /dev/null 1970-01-01 00:00:00.000000000 +0000 9892--- /dev/null 1970-01-01 00:00:00.000000000 +0000
9893+++ linux-2.6.27/drivers/gpu/drm/drm_ttm.c 2009-01-14 11:58:01.000000000 +0000 9893+++ linux-2.6.27/drivers/gpu/drm/drm_ttm.c 2009-02-05 13:29:33.000000000 +0000
9894@@ -0,0 +1,430 @@ 9894@@ -0,0 +1,430 @@
9895+/************************************************************************** 9895+/**************************************************************************
9896+ * 9896+ *
@@ -10324,8 +10324,8 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_ttm.c
10324+EXPORT_SYMBOL(drm_bind_ttm); 10324+EXPORT_SYMBOL(drm_bind_ttm);
10325Index: linux-2.6.27/drivers/gpu/drm/drm_vm.c 10325Index: linux-2.6.27/drivers/gpu/drm/drm_vm.c
10326=================================================================== 10326===================================================================
10327--- linux-2.6.27.orig/drivers/gpu/drm/drm_vm.c 2009-01-14 11:54:35.000000000 +0000 10327--- linux-2.6.27.orig/drivers/gpu/drm/drm_vm.c 2008-10-09 23:13:53.000000000 +0100
10328+++ linux-2.6.27/drivers/gpu/drm/drm_vm.c 2009-01-14 11:58:01.000000000 +0000 10328+++ linux-2.6.27/drivers/gpu/drm/drm_vm.c 2009-02-05 13:29:33.000000000 +0000
10329@@ -40,6 +40,10 @@ 10329@@ -40,6 +40,10 @@
10330 10330
10331 static void drm_vm_open(struct vm_area_struct *vma); 10331 static void drm_vm_open(struct vm_area_struct *vma);
@@ -10480,7 +10480,7 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_vm.c
10480+ if (address >= vma->vm_end) 10480+ if (address >= vma->vm_end)
10481+ break; 10481+ break;
10482+ if (bus_size) { 10482+ if (bus_size) {
10483+ pfn = ((bus_base + bus_offset) >> PAGE_SHIFT) 10483+ pfn = ((bus_base + bus_offset) >> PAGE_SHIFT)
10484+ + page_offset; 10484+ + page_offset;
10485+ } else { 10485+ } else {
10486+ page = drm_ttm_get_page(ttm, page_offset); 10486+ page = drm_ttm_get_page(ttm, page_offset);
@@ -10573,7 +10573,7 @@ Index: linux-2.6.27/drivers/gpu/drm/drm_vm.c
10573Index: linux-2.6.27/drivers/gpu/drm/psb/Makefile 10573Index: linux-2.6.27/drivers/gpu/drm/psb/Makefile
10574=================================================================== 10574===================================================================
10575--- /dev/null 1970-01-01 00:00:00.000000000 +0000 10575--- /dev/null 1970-01-01 00:00:00.000000000 +0000
10576+++ linux-2.6.27/drivers/gpu/drm/psb/Makefile 2009-01-14 11:58:01.000000000 +0000 10576+++ linux-2.6.27/drivers/gpu/drm/psb/Makefile 2009-02-05 13:29:33.000000000 +0000
10577@@ -0,0 +1,13 @@ 10577@@ -0,0 +1,13 @@
10578+# 10578+#
10579+# Makefile for the drm device driver. This driver provides support for the 10579+# Makefile for the drm device driver. This driver provides support for the
@@ -10591,7 +10591,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/Makefile
10591Index: linux-2.6.27/drivers/gpu/drm/psb/i915_drv.h 10591Index: linux-2.6.27/drivers/gpu/drm/psb/i915_drv.h
10592=================================================================== 10592===================================================================
10593--- /dev/null 1970-01-01 00:00:00.000000000 +0000 10593--- /dev/null 1970-01-01 00:00:00.000000000 +0000
10594+++ linux-2.6.27/drivers/gpu/drm/psb/i915_drv.h 2009-01-14 11:58:01.000000000 +0000 10594+++ linux-2.6.27/drivers/gpu/drm/psb/i915_drv.h 2009-02-05 13:29:33.000000000 +0000
10595@@ -0,0 +1,795 @@ 10595@@ -0,0 +1,795 @@
10596+/* i915_drv.h -- Private header for the I915 driver -*- linux-c -*- 10596+/* i915_drv.h -- Private header for the I915 driver -*- linux-c -*-
10597+ */ 10597+ */
@@ -11391,28 +11391,33 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/i915_drv.h
11391Index: linux-2.6.27/drivers/gpu/drm/psb/i915_reg.h 11391Index: linux-2.6.27/drivers/gpu/drm/psb/i915_reg.h
11392=================================================================== 11392===================================================================
11393--- /dev/null 1970-01-01 00:00:00.000000000 +0000 11393--- /dev/null 1970-01-01 00:00:00.000000000 +0000
11394+++ linux-2.6.27/drivers/gpu/drm/psb/i915_reg.h 2009-01-14 11:58:01.000000000 +0000 11394+++ linux-2.6.27/drivers/gpu/drm/psb/i915_reg.h 2009-02-05 18:29:58.000000000 +0000
11395@@ -0,0 +1,487 @@ 11395@@ -0,0 +1,98 @@
11396+#define BLC_PWM_CTL 0x61254 11396+/* Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.
11397+#define BLC_PWM_CTL2 0x61250 11397+ * All Rights Reserved.
11398+#define BACKLIGHT_MODULATION_FREQ_SHIFT (17)
11399+/**
11400+ * This is the most significant 15 bits of the number of backlight cycles in a
11401+ * complete cycle of the modulated backlight control.
11402+ * 11398+ *
11403+ * The actual value is this field multiplied by two. 11399+ * Permission is hereby granted, free of charge, to any person obtaining a
11404+ */ 11400+ * copy of this software and associated documentation files (the
11405+#define BACKLIGHT_MODULATION_FREQ_MASK (0x7fff << 17) 11401+ * "Software"), to deal in the Software without restriction, including
11406+#define BLM_LEGACY_MODE (1 << 16) 11402+ * without limitation the rights to use, copy, modify, merge, publish,
11407+/** 11403+ * distribute, sub license, and/or sell copies of the Software, and to
11408+ * This is the number of cycles out of the backlight modulation cycle for which 11404+ * permit persons to whom the Software is furnished to do so, subject to
11409+ * the backlight is on. 11405+ * the following conditions:
11410+ * 11406+ *
11411+ * This field must be no greater than the number of cycles in the complete 11407+ * The above copyright notice and this permission notice (including the
11412+ * backlight modulation cycle. 11408+ * next paragraph) shall be included in all copies or substantial portions
11409+ * of the Software.
11410+ *
11411+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
11412+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
11413+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
11414+ * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
11415+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
11416+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
11417+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
11413+ */ 11418+ */
11414+#define BACKLIGHT_DUTY_CYCLE_SHIFT (0) 11419+
11415+#define BACKLIGHT_DUTY_CYCLE_MASK (0xffff) 11420+#include "../i915/i915_reg.h"
11416+ 11421+
11417+#define I915_GCFGC 0xf0 11422+#define I915_GCFGC 0xf0
11418+#define I915_LOW_FREQUENCY_ENABLE (1 << 7) 11423+#define I915_LOW_FREQUENCY_ENABLE (1 << 7)
@@ -11427,426 +11432,11 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/i915_reg.h
11427+#define I855_CLOCK_100_133 (2 << 0) 11432+#define I855_CLOCK_100_133 (2 << 0)
11428+#define I855_CLOCK_166_250 (3 << 0) 11433+#define I855_CLOCK_166_250 (3 << 0)
11429+ 11434+
11430+/* I830 CRTC registers */
11431+#define HTOTAL_A 0x60000
11432+#define HBLANK_A 0x60004
11433+#define HSYNC_A 0x60008
11434+#define VTOTAL_A 0x6000c
11435+#define VBLANK_A 0x60010
11436+#define VSYNC_A 0x60014
11437+#define PIPEASRC 0x6001c
11438+#define BCLRPAT_A 0x60020
11439+#define VSYNCSHIFT_A 0x60028
11440+
11441+#define HTOTAL_B 0x61000
11442+#define HBLANK_B 0x61004
11443+#define HSYNC_B 0x61008
11444+#define VTOTAL_B 0x6100c
11445+#define VBLANK_B 0x61010
11446+#define VSYNC_B 0x61014
11447+#define PIPEBSRC 0x6101c
11448+#define BCLRPAT_B 0x61020
11449+#define VSYNCSHIFT_B 0x61028
11450+
11451+#define PP_STATUS 0x61200
11452+# define PP_ON (1 << 31)
11453+/**
11454+ * Indicates that all dependencies of the panel are on:
11455+ *
11456+ * - PLL enabled
11457+ * - pipe enabled
11458+ * - LVDS/DVOB/DVOC on
11459+ */
11460+# define PP_READY (1 << 30)
11461+# define PP_SEQUENCE_NONE (0 << 28)
11462+# define PP_SEQUENCE_ON (1 << 28)
11463+# define PP_SEQUENCE_OFF (2 << 28)
11464+# define PP_SEQUENCE_MASK 0x30000000
11465+#define PP_CONTROL 0x61204
11466+# define POWER_TARGET_ON (1 << 0)
11467+
11468+#define LVDSPP_ON 0x61208 11435+#define LVDSPP_ON 0x61208
11469+#define LVDSPP_OFF 0x6120c 11436+#define LVDSPP_OFF 0x6120c
11470+#define PP_CYCLE 0x61210 11437+#define PP_CYCLE 0x61210
11471+ 11438+
11472+#define PFIT_CONTROL 0x61230
11473+# define PFIT_ENABLE (1 << 31)
11474+# define PFIT_PIPE_MASK (3 << 29)
11475+# define PFIT_PIPE_SHIFT 29
11476+# define VERT_INTERP_DISABLE (0 << 10)
11477+# define VERT_INTERP_BILINEAR (1 << 10)
11478+# define VERT_INTERP_MASK (3 << 10)
11479+# define VERT_AUTO_SCALE (1 << 9)
11480+# define HORIZ_INTERP_DISABLE (0 << 6)
11481+# define HORIZ_INTERP_BILINEAR (1 << 6)
11482+# define HORIZ_INTERP_MASK (3 << 6)
11483+# define HORIZ_AUTO_SCALE (1 << 5)
11484+# define PANEL_8TO6_DITHER_ENABLE (1 << 3)
11485+
11486+#define PFIT_PGM_RATIOS 0x61234
11487+# define PFIT_VERT_SCALE_MASK 0xfff00000
11488+# define PFIT_HORIZ_SCALE_MASK 0x0000fff0
11489+
11490+#define PFIT_AUTO_RATIOS 0x61238
11491+
11492+
11493+#define DPLL_A 0x06014
11494+#define DPLL_B 0x06018
11495+# define DPLL_VCO_ENABLE (1 << 31)
11496+# define DPLL_DVO_HIGH_SPEED (1 << 30)
11497+# define DPLL_SYNCLOCK_ENABLE (1 << 29)
11498+# define DPLL_VGA_MODE_DIS (1 << 28)
11499+# define DPLLB_MODE_DAC_SERIAL (1 << 26) /* i915 */
11500+# define DPLLB_MODE_LVDS (2 << 26) /* i915 */
11501+# define DPLL_MODE_MASK (3 << 26)
11502+# define DPLL_DAC_SERIAL_P2_CLOCK_DIV_10 (0 << 24) /* i915 */
11503+# define DPLL_DAC_SERIAL_P2_CLOCK_DIV_5 (1 << 24) /* i915 */
11504+# define DPLLB_LVDS_P2_CLOCK_DIV_14 (0 << 24) /* i915 */
11505+# define DPLLB_LVDS_P2_CLOCK_DIV_7 (1 << 24) /* i915 */
11506+# define DPLL_P2_CLOCK_DIV_MASK 0x03000000 /* i915 */
11507+# define DPLL_FPA01_P1_POST_DIV_MASK 0x00ff0000 /* i915 */
11508+/**
11509+ * The i830 generation, in DAC/serial mode, defines p1 as two plus this
11510+ * bitfield, or just 2 if PLL_P1_DIVIDE_BY_TWO is set.
11511+ */
11512+# define DPLL_FPA01_P1_POST_DIV_MASK_I830 0x001f0000
11513+/**
11514+ * The i830 generation, in LVDS mode, defines P1 as the bit number set within
11515+ * this field (only one bit may be set).
11516+ */
11517+# define DPLL_FPA01_P1_POST_DIV_MASK_I830_LVDS 0x003f0000
11518+# define DPLL_FPA01_P1_POST_DIV_SHIFT 16
11519+# define PLL_P2_DIVIDE_BY_4 (1 << 23) /* i830, required in DVO non-gang */
11520+# define PLL_P1_DIVIDE_BY_TWO (1 << 21) /* i830 */
11521+# define PLL_REF_INPUT_DREFCLK (0 << 13)
11522+# define PLL_REF_INPUT_TVCLKINA (1 << 13) /* i830 */
11523+# define PLL_REF_INPUT_TVCLKINBC (2 << 13) /* SDVO TVCLKIN */
11524+# define PLLB_REF_INPUT_SPREADSPECTRUMIN (3 << 13)
11525+# define PLL_REF_INPUT_MASK (3 << 13)
11526+# define PLL_LOAD_PULSE_PHASE_SHIFT 9
11527+/*
11528+ * Parallel to Serial Load Pulse phase selection.
11529+ * Selects the phase for the 10X DPLL clock for the PCIe
11530+ * digital display port. The range is 4 to 13; 10 or more
11531+ * is just a flip delay. The default is 6
11532+ */
11533+# define PLL_LOAD_PULSE_PHASE_MASK (0xf << PLL_LOAD_PULSE_PHASE_SHIFT)
11534+# define DISPLAY_RATE_SELECT_FPA1 (1 << 8)
11535+
11536+/**
11537+ * SDVO multiplier for 945G/GM. Not used on 965.
11538+ *
11539+ * \sa DPLL_MD_UDI_MULTIPLIER_MASK
11540+ */
11541+# define SDVO_MULTIPLIER_MASK 0x000000ff
11542+# define SDVO_MULTIPLIER_SHIFT_HIRES 4
11543+# define SDVO_MULTIPLIER_SHIFT_VGA 0
11544+
11545+/** @defgroup DPLL_MD
11546+ * @{
11547+ */
11548+/** Pipe A SDVO/UDI clock multiplier/divider register for G965. */
11549+#define DPLL_A_MD 0x0601c
11550+/** Pipe B SDVO/UDI clock multiplier/divider register for G965. */
11551+#define DPLL_B_MD 0x06020
11552+/**
11553+ * UDI pixel divider, controlling how many pixels are stuffed into a packet.
11554+ *
11555+ * Value is pixels minus 1. Must be set to 1 pixel for SDVO.
11556+ */
11557+# define DPLL_MD_UDI_DIVIDER_MASK 0x3f000000
11558+# define DPLL_MD_UDI_DIVIDER_SHIFT 24
11559+/** UDI pixel divider for VGA, same as DPLL_MD_UDI_DIVIDER_MASK. */
11560+# define DPLL_MD_VGA_UDI_DIVIDER_MASK 0x003f0000
11561+# define DPLL_MD_VGA_UDI_DIVIDER_SHIFT 16
11562+/**
11563+ * SDVO/UDI pixel multiplier.
11564+ *
11565+ * SDVO requires that the bus clock rate be between 1 and 2 Ghz, and the bus
11566+ * clock rate is 10 times the DPLL clock. At low resolution/refresh rate
11567+ * modes, the bus rate would be below the limits, so SDVO allows for stuffing
11568+ * dummy bytes in the datastream at an increased clock rate, with both sides of
11569+ * the link knowing how many bytes are fill.
11570+ *
11571+ * So, for a mode with a dotclock of 65Mhz, we would want to double the clock
11572+ * rate to 130Mhz to get a bus rate of 1.30Ghz. The DPLL clock rate would be
11573+ * set to 130Mhz, and the SDVO multiplier set to 2x in this register and
11574+ * through an SDVO command.
11575+ *
11576+ * This register field has values of multiplication factor minus 1, with
11577+ * a maximum multiplier of 5 for SDVO.
11578+ */
11579+# define DPLL_MD_UDI_MULTIPLIER_MASK 0x00003f00
11580+# define DPLL_MD_UDI_MULTIPLIER_SHIFT 8
11581+/** SDVO/UDI pixel multiplier for VGA, same as DPLL_MD_UDI_MULTIPLIER_MASK.
11582+ * This best be set to the default value (3) or the CRT won't work. No,
11583+ * I don't entirely understand what this does...
11584+ */
11585+# define DPLL_MD_VGA_UDI_MULTIPLIER_MASK 0x0000003f
11586+# define DPLL_MD_VGA_UDI_MULTIPLIER_SHIFT 0
11587+/** @} */
11588+
11589+#define DPLL_TEST 0x606c
11590+# define DPLLB_TEST_SDVO_DIV_1 (0 << 22)
11591+# define DPLLB_TEST_SDVO_DIV_2 (1 << 22)
11592+# define DPLLB_TEST_SDVO_DIV_4 (2 << 22)
11593+# define DPLLB_TEST_SDVO_DIV_MASK (3 << 22)
11594+# define DPLLB_TEST_N_BYPASS (1 << 19)
11595+# define DPLLB_TEST_M_BYPASS (1 << 18)
11596+# define DPLLB_INPUT_BUFFER_ENABLE (1 << 16)
11597+# define DPLLA_TEST_N_BYPASS (1 << 3)
11598+# define DPLLA_TEST_M_BYPASS (1 << 2)
11599+# define DPLLA_INPUT_BUFFER_ENABLE (1 << 0)
11600+
11601+#define ADPA 0x61100
11602+#define ADPA_DAC_ENABLE (1<<31)
11603+#define ADPA_DAC_DISABLE 0
11604+#define ADPA_PIPE_SELECT_MASK (1<<30)
11605+#define ADPA_PIPE_A_SELECT 0
11606+#define ADPA_PIPE_B_SELECT (1<<30)
11607+#define ADPA_USE_VGA_HVPOLARITY (1<<15)
11608+#define ADPA_SETS_HVPOLARITY 0
11609+#define ADPA_VSYNC_CNTL_DISABLE (1<<11)
11610+#define ADPA_VSYNC_CNTL_ENABLE 0
11611+#define ADPA_HSYNC_CNTL_DISABLE (1<<10)
11612+#define ADPA_HSYNC_CNTL_ENABLE 0
11613+#define ADPA_VSYNC_ACTIVE_HIGH (1<<4)
11614+#define ADPA_VSYNC_ACTIVE_LOW 0
11615+#define ADPA_HSYNC_ACTIVE_HIGH (1<<3)
11616+#define ADPA_HSYNC_ACTIVE_LOW 0
11617+
11618+#define FPA0 0x06040
11619+#define FPA1 0x06044
11620+#define FPB0 0x06048
11621+#define FPB1 0x0604c
11622+# define FP_N_DIV_MASK 0x003f0000
11623+# define FP_N_DIV_SHIFT 16
11624+# define FP_M1_DIV_MASK 0x00003f00
11625+# define FP_M1_DIV_SHIFT 8
11626+# define FP_M2_DIV_MASK 0x0000003f
11627+# define FP_M2_DIV_SHIFT 0
11628+
11629+
11630+#define PORT_HOTPLUG_EN 0x61110
11631+# define SDVOB_HOTPLUG_INT_EN (1 << 26)
11632+# define SDVOC_HOTPLUG_INT_EN (1 << 25)
11633+# define TV_HOTPLUG_INT_EN (1 << 18)
11634+# define CRT_HOTPLUG_INT_EN (1 << 9)
11635+# define CRT_HOTPLUG_FORCE_DETECT (1 << 3)
11636+
11637+#define PORT_HOTPLUG_STAT 0x61114
11638+# define CRT_HOTPLUG_INT_STATUS (1 << 11)
11639+# define TV_HOTPLUG_INT_STATUS (1 << 10)
11640+# define CRT_HOTPLUG_MONITOR_MASK (3 << 8)
11641+# define CRT_HOTPLUG_MONITOR_COLOR (3 << 8)
11642+# define CRT_HOTPLUG_MONITOR_MONO (2 << 8)
11643+# define CRT_HOTPLUG_MONITOR_NONE (0 << 8)
11644+# define SDVOC_HOTPLUG_INT_STATUS (1 << 7)
11645+# define SDVOB_HOTPLUG_INT_STATUS (1 << 6)
11646+
11647+#define SDVOB 0x61140
11648+#define SDVOC 0x61160
11649+#define SDVO_ENABLE (1 << 31)
11650+#define SDVO_PIPE_B_SELECT (1 << 30)
11651+#define SDVO_STALL_SELECT (1 << 29)
11652+#define SDVO_INTERRUPT_ENABLE (1 << 26)
11653+/**
11654+ * 915G/GM SDVO pixel multiplier.
11655+ *
11656+ * Programmed value is multiplier - 1, up to 5x.
11657+ *
11658+ * \sa DPLL_MD_UDI_MULTIPLIER_MASK
11659+ */
11660+#define SDVO_PORT_MULTIPLY_MASK (7 << 23)
11661+#define SDVO_PORT_MULTIPLY_SHIFT 23
11662+#define SDVO_PHASE_SELECT_MASK (15 << 19)
11663+#define SDVO_PHASE_SELECT_DEFAULT (6 << 19)
11664+#define SDVO_CLOCK_OUTPUT_INVERT (1 << 18)
11665+#define SDVOC_GANG_MODE (1 << 16)
11666+#define SDVO_BORDER_ENABLE (1 << 7)
11667+#define SDVOB_PCIE_CONCURRENCY (1 << 3)
11668+#define SDVO_DETECTED (1 << 2)
11669+/* Bits to be preserved when writing */
11670+#define SDVOB_PRESERVE_MASK ((1 << 17) | (1 << 16) | (1 << 14))
11671+#define SDVOC_PRESERVE_MASK (1 << 17)
11672+
11673+/** @defgroup LVDS
11674+ * @{
11675+ */
11676+/**
11677+ * This register controls the LVDS output enable, pipe selection, and data
11678+ * format selection.
11679+ *
11680+ * All of the clock/data pairs are force powered down by power sequencing.
11681+ */
11682+#define LVDS 0x61180
11683+/**
11684+ * Enables the LVDS port. This bit must be set before DPLLs are enabled, as
11685+ * the DPLL semantics change when the LVDS is assigned to that pipe.
11686+ */
11687+# define LVDS_PORT_EN (1 << 31)
11688+/** Selects pipe B for LVDS data. Must be set on pre-965. */
11689+# define LVDS_PIPEB_SELECT (1 << 30)
11690+
11691+/**
11692+ * Enables the A0-A2 data pairs and CLKA, containing 18 bits of color data per
11693+ * pixel.
11694+ */
11695+# define LVDS_A0A2_CLKA_POWER_MASK (3 << 8)
11696+# define LVDS_A0A2_CLKA_POWER_DOWN (0 << 8)
11697+# define LVDS_A0A2_CLKA_POWER_UP (3 << 8)
11698+/**
11699+ * Controls the A3 data pair, which contains the additional LSBs for 24 bit
11700+ * mode. Only enabled if LVDS_A0A2_CLKA_POWER_UP also indicates it should be
11701+ * on.
11702+ */
11703+# define LVDS_A3_POWER_MASK (3 << 6)
11704+# define LVDS_A3_POWER_DOWN (0 << 6)
11705+# define LVDS_A3_POWER_UP (3 << 6)
11706+/**
11707+ * Controls the CLKB pair. This should only be set when LVDS_B0B3_POWER_UP
11708+ * is set.
11709+ */
11710+# define LVDS_CLKB_POWER_MASK (3 << 4)
11711+# define LVDS_CLKB_POWER_DOWN (0 << 4)
11712+# define LVDS_CLKB_POWER_UP (3 << 4)
11713+
11714+/**
11715+ * Controls the B0-B3 data pairs. This must be set to match the DPLL p2
11716+ * setting for whether we are in dual-channel mode. The B3 pair will
11717+ * additionally only be powered up when LVDS_A3_POWER_UP is set.
11718+ */
11719+# define LVDS_B0B3_POWER_MASK (3 << 2)
11720+# define LVDS_B0B3_POWER_DOWN (0 << 2)
11721+# define LVDS_B0B3_POWER_UP (3 << 2)
11722+
11723+#define PIPEACONF 0x70008
11724+#define PIPEACONF_ENABLE (1<<31)
11725+#define PIPEACONF_DISABLE 0
11726+#define PIPEACONF_DOUBLE_WIDE (1<<30)
11727+#define I965_PIPECONF_ACTIVE (1<<30)
11728+#define PIPEACONF_SINGLE_WIDE 0
11729+#define PIPEACONF_PIPE_UNLOCKED 0
11730+#define PIPEACONF_PIPE_LOCKED (1<<25)
11731+#define PIPEACONF_PALETTE 0
11732+#define PIPEACONF_GAMMA (1<<24)
11733+#define PIPECONF_FORCE_BORDER (1<<25)
11734+#define PIPECONF_PROGRESSIVE (0 << 21)
11735+#define PIPECONF_INTERLACE_W_FIELD_INDICATION (6 << 21)
11736+#define PIPECONF_INTERLACE_FIELD_0_ONLY (7 << 21)
11737+
11738+#define PIPEBCONF 0x71008
11739+#define PIPEBCONF_ENABLE (1<<31)
11740+#define PIPEBCONF_DISABLE 0
11741+#define PIPEBCONF_DOUBLE_WIDE (1<<30)
11742+#define PIPEBCONF_DISABLE 0
11743+#define PIPEBCONF_GAMMA (1<<24)
11744+#define PIPEBCONF_PALETTE 0
11745+
11746+#define PIPEBGCMAXRED 0x71010
11747+#define PIPEBGCMAXGREEN 0x71014
11748+#define PIPEBGCMAXBLUE 0x71018
11749+#define PIPEBSTAT 0x71024
11750+#define PIPEBFRAMEHIGH 0x71040
11751+#define PIPEBFRAMEPIXEL 0x71044
11752+
11753+#define DSPACNTR 0x70180
11754+#define DSPBCNTR 0x71180
11755+#define DISPLAY_PLANE_ENABLE (1<<31)
11756+#define DISPLAY_PLANE_DISABLE 0
11757+#define DISPPLANE_GAMMA_ENABLE (1<<30)
11758+#define DISPPLANE_GAMMA_DISABLE 0
11759+#define DISPPLANE_PIXFORMAT_MASK (0xf<<26)
11760+#define DISPPLANE_8BPP (0x2<<26)
11761+#define DISPPLANE_15_16BPP (0x4<<26)
11762+#define DISPPLANE_16BPP (0x5<<26)
11763+#define DISPPLANE_32BPP_NO_ALPHA (0x6<<26)
11764+#define DISPPLANE_32BPP (0x7<<26)
11765+#define DISPPLANE_STEREO_ENABLE (1<<25)
11766+#define DISPPLANE_STEREO_DISABLE 0
11767+#define DISPPLANE_SEL_PIPE_MASK (1<<24)
11768+#define DISPPLANE_SEL_PIPE_A 0
11769+#define DISPPLANE_SEL_PIPE_B (1<<24)
11770+#define DISPPLANE_SRC_KEY_ENABLE (1<<22)
11771+#define DISPPLANE_SRC_KEY_DISABLE 0
11772+#define DISPPLANE_LINE_DOUBLE (1<<20)
11773+#define DISPPLANE_NO_LINE_DOUBLE 0
11774+#define DISPPLANE_STEREO_POLARITY_FIRST 0
11775+#define DISPPLANE_STEREO_POLARITY_SECOND (1<<18)
11776+/* plane B only */
11777+#define DISPPLANE_ALPHA_TRANS_ENABLE (1<<15)
11778+#define DISPPLANE_ALPHA_TRANS_DISABLE 0
11779+#define DISPPLANE_SPRITE_ABOVE_DISPLAYA 0
11780+#define DISPPLANE_SPRITE_ABOVE_OVERLAY (1)
11781+
11782+#define DSPABASE 0x70184
11783+#define DSPASTRIDE 0x70188
11784+
11785+#define DSPBBASE 0x71184
11786+#define DSPBADDR DSPBBASE
11787+#define DSPBSTRIDE 0x71188
11788+ 11439+
11789+#define DSPAKEYVAL 0x70194
11790+#define DSPAKEYMASK 0x70198
11791+
11792+#define DSPAPOS 0x7018C /* reserved */
11793+#define DSPASIZE 0x70190
11794+#define DSPBPOS 0x7118C
11795+#define DSPBSIZE 0x71190
11796+
11797+#define DSPASURF 0x7019C
11798+#define DSPATILEOFF 0x701A4
11799+
11800+#define DSPBSURF 0x7119C
11801+#define DSPBTILEOFF 0x711A4
11802+
11803+#define VGACNTRL 0x71400
11804+# define VGA_DISP_DISABLE (1 << 31)
11805+# define VGA_2X_MODE (1 << 30)
11806+# define VGA_PIPE_B_SELECT (1 << 29)
11807+
11808+/*
11809+ * Some BIOS scratch area registers. The 845 (and 830?) store the amount
11810+ * of video memory available to the BIOS in SWF1.
11811+ */
11812+
11813+#define SWF0 0x71410
11814+#define SWF1 0x71414
11815+#define SWF2 0x71418
11816+#define SWF3 0x7141c
11817+#define SWF4 0x71420
11818+#define SWF5 0x71424
11819+#define SWF6 0x71428
11820+
11821+/*
11822+ * 855 scratch registers.
11823+ */
11824+#define SWF00 0x70410
11825+#define SWF01 0x70414
11826+#define SWF02 0x70418
11827+#define SWF03 0x7041c
11828+#define SWF04 0x70420
11829+#define SWF05 0x70424
11830+#define SWF06 0x70428
11831+
11832+#define SWF10 SWF0
11833+#define SWF11 SWF1
11834+#define SWF12 SWF2
11835+#define SWF13 SWF3
11836+#define SWF14 SWF4
11837+#define SWF15 SWF5
11838+#define SWF16 SWF6
11839+
11840+#define SWF30 0x72414
11841+#define SWF31 0x72418
11842+#define SWF32 0x7241c
11843+
11844+
11845+/*
11846+ * Palette registers
11847+ */
11848+#define PALETTE_A 0x0a000
11849+#define PALETTE_B 0x0a800
11850+ 11440+
11851+#define IS_I830(dev) ((dev)->pci_device == PCI_DEVICE_ID_INTEL_82830_CGC) 11441+#define IS_I830(dev) ((dev)->pci_device == PCI_DEVICE_ID_INTEL_82830_CGC)
11852+#define IS_845G(dev) ((dev)->pci_device == PCI_DEVICE_ID_INTEL_82845G_IG) 11442+#define IS_845G(dev) ((dev)->pci_device == PCI_DEVICE_ID_INTEL_82845G_IG)
@@ -11880,10 +11470,31 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/i915_reg.h
11880+ 11470+
11881+#define IS_POULSBO(dev) (((dev)->pci_device == 0x8108) || \ 11471+#define IS_POULSBO(dev) (((dev)->pci_device == 0x8108) || \
11882+ ((dev)->pci_device == 0x8109)) 11472+ ((dev)->pci_device == 0x8109))
11473+
11474+#define FPA0 0x06040
11475+#define FPA1 0x06044
11476+#define FPB0 0x06048
11477+#define FPB1 0x0604c
11478+#define FP_N_DIV_MASK 0x003f0000
11479+#define FP_N_DIV_SHIFT 16
11480+#define FP_M1_DIV_MASK 0x00003f00
11481+#define FP_M1_DIV_SHIFT 8
11482+#define FP_M2_DIV_MASK 0x0000003f
11483+#define FP_M2_DIV_SHIFT 0
11484+
11485+#define DSPABASE 0x70184
11486+#define DSPBBASE 0x71184
11487+#define DSPAKEYVAL 0x70194
11488+#define DSPAKEYMASK 0x70198
11489+
11490+#define VSYNCSHIFT_A 0x60028
11491+#define VSYNCSHIFT_B 0x61028
11492+#define DPLL_B_MD 0x06020
11493+
11883Index: linux-2.6.27/drivers/gpu/drm/psb/intel_crt.c 11494Index: linux-2.6.27/drivers/gpu/drm/psb/intel_crt.c
11884=================================================================== 11495===================================================================
11885--- /dev/null 1970-01-01 00:00:00.000000000 +0000 11496--- /dev/null 1970-01-01 00:00:00.000000000 +0000
11886+++ linux-2.6.27/drivers/gpu/drm/psb/intel_crt.c 2009-01-14 11:58:01.000000000 +0000 11497+++ linux-2.6.27/drivers/gpu/drm/psb/intel_crt.c 2009-02-05 13:29:33.000000000 +0000
11887@@ -0,0 +1,242 @@ 11498@@ -0,0 +1,242 @@
11888+/* 11499+/*
11889+ * Copyright © 2006-2007 Intel Corporation 11500+ * Copyright © 2006-2007 Intel Corporation
@@ -11918,11 +11529,11 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_crt.c
11918+ struct drm_device *dev = output->dev; 11529+ struct drm_device *dev = output->dev;
11919+ DRM_DRIVER_PRIVATE_T *dev_priv = dev->dev_private; 11530+ DRM_DRIVER_PRIVATE_T *dev_priv = dev->dev_private;
11920+ u32 temp; 11531+ u32 temp;
11921+ 11532+
11922+ temp = I915_READ(ADPA); 11533+ temp = I915_READ(ADPA);
11923+ temp &= ~(ADPA_HSYNC_CNTL_DISABLE | ADPA_VSYNC_CNTL_DISABLE); 11534+ temp &= ~(ADPA_HSYNC_CNTL_DISABLE | ADPA_VSYNC_CNTL_DISABLE);
11924+ temp &= ~ADPA_DAC_ENABLE; 11535+ temp &= ~ADPA_DAC_ENABLE;
11925+ 11536+
11926+ switch(mode) { 11537+ switch(mode) {
11927+ case DPMSModeOn: 11538+ case DPMSModeOn:
11928+ temp |= ADPA_DAC_ENABLE; 11539+ temp |= ADPA_DAC_ENABLE;
@@ -11937,13 +11548,13 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_crt.c
11937+ temp |= ADPA_HSYNC_CNTL_DISABLE | ADPA_VSYNC_CNTL_DISABLE; 11548+ temp |= ADPA_HSYNC_CNTL_DISABLE | ADPA_VSYNC_CNTL_DISABLE;
11938+ break; 11549+ break;
11939+ } 11550+ }
11940+ 11551+
11941+ I915_WRITE(ADPA, temp); 11552+ I915_WRITE(ADPA, temp);
11942+} 11553+}
11943+ 11554+
11944+static void intel_crt_save(struct drm_output *output) 11555+static void intel_crt_save(struct drm_output *output)
11945+{ 11556+{
11946+ 11557+
11947+} 11558+}
11948+ 11559+
11949+static void intel_crt_restore(struct drm_output *output) 11560+static void intel_crt_restore(struct drm_output *output)
@@ -11981,7 +11592,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_crt.c
11981+ int dpll_md_reg; 11592+ int dpll_md_reg;
11982+ u32 adpa, dpll_md; 11593+ u32 adpa, dpll_md;
11983+ 11594+
11984+ if (intel_crtc->pipe == 0) 11595+ if (intel_crtc->pipe == 0)
11985+ dpll_md_reg = DPLL_A_MD; 11596+ dpll_md_reg = DPLL_A_MD;
11986+ else 11597+ else
11987+ dpll_md_reg = DPLL_B_MD; 11598+ dpll_md_reg = DPLL_B_MD;
@@ -11995,18 +11606,18 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_crt.c
11995+ I915_WRITE(dpll_md_reg, 11606+ I915_WRITE(dpll_md_reg,
11996+ dpll_md & ~DPLL_MD_UDI_MULTIPLIER_MASK); 11607+ dpll_md & ~DPLL_MD_UDI_MULTIPLIER_MASK);
11997+ } 11608+ }
11998+ 11609+
11999+ adpa = 0; 11610+ adpa = 0;
12000+ if (adjusted_mode->flags & V_PHSYNC) 11611+ if (adjusted_mode->flags & V_PHSYNC)
12001+ adpa |= ADPA_HSYNC_ACTIVE_HIGH; 11612+ adpa |= ADPA_HSYNC_ACTIVE_HIGH;
12002+ if (adjusted_mode->flags & V_PVSYNC) 11613+ if (adjusted_mode->flags & V_PVSYNC)
12003+ adpa |= ADPA_VSYNC_ACTIVE_HIGH; 11614+ adpa |= ADPA_VSYNC_ACTIVE_HIGH;
12004+ 11615+
12005+ if (intel_crtc->pipe == 0) 11616+ if (intel_crtc->pipe == 0)
12006+ adpa |= ADPA_PIPE_A_SELECT; 11617+ adpa |= ADPA_PIPE_A_SELECT;
12007+ else 11618+ else
12008+ adpa |= ADPA_PIPE_B_SELECT; 11619+ adpa |= ADPA_PIPE_B_SELECT;
12009+ 11620+
12010+ I915_WRITE(ADPA, adpa); 11621+ I915_WRITE(ADPA, adpa);
12011+} 11622+}
12012+ 11623+
@@ -12050,14 +11661,14 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_crt.c
12050+ /* CRT should always be at 0, but check anyway */ 11661+ /* CRT should always be at 0, but check anyway */
12051+ if (intel_output->type != INTEL_OUTPUT_ANALOG) 11662+ if (intel_output->type != INTEL_OUTPUT_ANALOG)
12052+ return false; 11663+ return false;
12053+ 11664+
12054+ return intel_ddc_probe(output); 11665+ return intel_ddc_probe(output);
12055+} 11666+}
12056+ 11667+
12057+static enum drm_output_status intel_crt_detect(struct drm_output *output) 11668+static enum drm_output_status intel_crt_detect(struct drm_output *output)
12058+{ 11669+{
12059+ struct drm_device *dev = output->dev; 11670+ struct drm_device *dev = output->dev;
12060+ 11671+
12061+ if (IS_I945G(dev) || IS_I945GM(dev) || IS_I965G(dev)) { 11672+ if (IS_I945G(dev) || IS_I945GM(dev) || IS_I965G(dev)) {
12062+ if (intel_crt_detect_hotplug(output)) 11673+ if (intel_crt_detect_hotplug(output))
12063+ return output_status_connected; 11674+ return output_status_connected;
@@ -12130,7 +11741,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_crt.c
12130Index: linux-2.6.27/drivers/gpu/drm/psb/intel_display.c 11741Index: linux-2.6.27/drivers/gpu/drm/psb/intel_display.c
12131=================================================================== 11742===================================================================
12132--- /dev/null 1970-01-01 00:00:00.000000000 +0000 11743--- /dev/null 1970-01-01 00:00:00.000000000 +0000
12133+++ linux-2.6.27/drivers/gpu/drm/psb/intel_display.c 2009-01-14 11:58:01.000000000 +0000 11744+++ linux-2.6.27/drivers/gpu/drm/psb/intel_display.c 2009-02-05 13:29:33.000000000 +0000
12134@@ -0,0 +1,1472 @@ 11745@@ -0,0 +1,1472 @@
12135+/* 11746+/*
12136+ * Copyright © 2006-2007 Intel Corporation 11747+ * Copyright © 2006-2007 Intel Corporation
@@ -12163,7 +11774,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_display.c
12163+bool intel_pipe_has_type (struct drm_crtc *crtc, int type); 11774+bool intel_pipe_has_type (struct drm_crtc *crtc, int type);
12164+ 11775+
12165+typedef struct { 11776+typedef struct {
12166+ /* given values */ 11777+ /* given values */
12167+ int n; 11778+ int n;
12168+ int m1, m2; 11779+ int m1, m2;
12169+ int p1, p2; 11780+ int p1, p2;
@@ -12302,7 +11913,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_display.c
12302+{ 11913+{
12303+ struct drm_device *dev = crtc->dev; 11914+ struct drm_device *dev = crtc->dev;
12304+ const intel_limit_t *limit; 11915+ const intel_limit_t *limit;
12305+ 11916+
12306+ if (IS_I9XX(dev)) { 11917+ if (IS_I9XX(dev)) {
12307+ if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS)) 11918+ if (intel_pipe_has_type(crtc, INTEL_OUTPUT_LVDS))
12308+ limit = &intel_limits[INTEL_LIMIT_I9XX_LVDS]; 11919+ limit = &intel_limits[INTEL_LIMIT_I9XX_LVDS];
@@ -12374,7 +11985,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_display.c
12374+static bool intel_PLL_is_valid(struct drm_crtc *crtc, intel_clock_t *clock) 11985+static bool intel_PLL_is_valid(struct drm_crtc *crtc, intel_clock_t *clock)
12375+{ 11986+{
12376+ const intel_limit_t *limit = intel_limit (crtc); 11987+ const intel_limit_t *limit = intel_limit (crtc);
12377+ 11988+
12378+ if (clock->p1 < limit->p1.min || limit->p1.max < clock->p1) 11989+ if (clock->p1 < limit->p1.min || limit->p1.max < clock->p1)
12379+ INTELPllInvalid ("p1 out of range\n"); 11990+ INTELPllInvalid ("p1 out of range\n");
12380+ if (clock->p < limit->p.min || limit->p.max < clock->p) 11991+ if (clock->p < limit->p.min || limit->p.max < clock->p)
@@ -12396,7 +12007,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_display.c
12396+ */ 12007+ */
12397+ if (clock->dot < limit->dot.min || limit->dot.max < clock->dot) 12008+ if (clock->dot < limit->dot.min || limit->dot.max < clock->dot)
12398+ INTELPllInvalid ("dot out of range\n"); 12009+ INTELPllInvalid ("dot out of range\n");
12399+ 12010+
12400+ return true; 12011+ return true;
12401+} 12012+}
12402+ 12013+
@@ -12433,9 +12044,9 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_display.c
12433+ else 12044+ else
12434+ clock.p2 = limit->p2.p2_fast; 12045+ clock.p2 = limit->p2.p2_fast;
12435+ } 12046+ }
12436+ 12047+
12437+ memset (best_clock, 0, sizeof (*best_clock)); 12048+ memset (best_clock, 0, sizeof (*best_clock));
12438+ 12049+
12439+ for (clock.m1 = limit->m1.min; clock.m1 <= limit->m1.max; clock.m1++) { 12050+ for (clock.m1 = limit->m1.min; clock.m1 <= limit->m1.max; clock.m1++) {
12440+ for (clock.m2 = limit->m2.min; clock.m2 < clock.m1 && 12051+ for (clock.m2 = limit->m2.min; clock.m2 < clock.m1 &&
12441+ clock.m2 <= limit->m2.max; clock.m2++) { 12052+ clock.m2 <= limit->m2.max; clock.m2++) {
@@ -12444,12 +12055,12 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_display.c
12444+ for (clock.p1 = limit->p1.min; 12055+ for (clock.p1 = limit->p1.min;
12445+ clock.p1 <= limit->p1.max; clock.p1++) { 12056+ clock.p1 <= limit->p1.max; clock.p1++) {
12446+ int this_err; 12057+ int this_err;
12447+ 12058+
12448+ intel_clock(dev, refclk, &clock); 12059+ intel_clock(dev, refclk, &clock);
12449+ 12060+
12450+ if (!intel_PLL_is_valid(crtc, &clock)) 12061+ if (!intel_PLL_is_valid(crtc, &clock))
12451+ continue; 12062+ continue;
12452+ 12063+
12453+ this_err = abs(clock.dot - target); 12064+ this_err = abs(clock.dot - target);
12454+ if (this_err < err) { 12065+ if (this_err < err) {
12455+ *best_clock = clock; 12066+ *best_clock = clock;
@@ -12515,11 +12126,11 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_display.c
12515+ I915_WRITE(dspbase, Start + Offset); 12126+ I915_WRITE(dspbase, Start + Offset);
12516+ I915_READ(dspbase); 12127+ I915_READ(dspbase);
12517+ } 12128+ }
12518+
12519+ 12129+
12520+ if (!dev_priv->sarea_priv) 12130+
12131+ if (!dev_priv->sarea_priv)
12521+ return; 12132+ return;
12522+ 12133+
12523+ switch (pipe) { 12134+ switch (pipe) {
12524+ case 0: 12135+ case 0:
12525+ dev_priv->sarea_priv->planeA_x = x; 12136+ dev_priv->sarea_priv->planeA_x = x;
@@ -12577,7 +12188,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_display.c
12577+ /* Wait for the clocks to stabilize. */ 12188+ /* Wait for the clocks to stabilize. */
12578+ udelay(150); 12189+ udelay(150);
12579+ } 12190+ }
12580+ 12191+
12581+ /* Enable the pipe */ 12192+ /* Enable the pipe */
12582+ temp = I915_READ(pipeconf_reg); 12193+ temp = I915_READ(pipeconf_reg);
12583+ if ((temp & PIPEACONF_ENABLE) == 0) 12194+ if ((temp & PIPEACONF_ENABLE) == 0)
@@ -12595,16 +12206,16 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_display.c
12595+ /* Flush the plane changes */ 12206+ /* Flush the plane changes */
12596+ I915_WRITE(dspbase_reg, I915_READ(dspbase_reg)); 12207+ I915_WRITE(dspbase_reg, I915_READ(dspbase_reg));
12597+ } 12208+ }
12598+ 12209+
12599+ intel_crtc_load_lut(crtc); 12210+ intel_crtc_load_lut(crtc);
12600+ 12211+
12601+ /* Give the overlay scaler a chance to enable if it's on this pipe */ 12212+ /* Give the overlay scaler a chance to enable if it's on this pipe */
12602+ //intel_crtc_dpms_video(crtc, TRUE); TODO 12213+ //intel_crtc_dpms_video(crtc, TRUE); TODO
12603+ break; 12214+ break;
12604+ case DPMSModeOff: 12215+ case DPMSModeOff:
12605+ /* Give the overlay scaler a chance to disable if it's on this pipe */ 12216+ /* Give the overlay scaler a chance to disable if it's on this pipe */
12606+ //intel_crtc_dpms_video(crtc, FALSE); TODO 12217+ //intel_crtc_dpms_video(crtc, FALSE); TODO
12607+ 12218+
12608+ /* Disable display plane */ 12219+ /* Disable display plane */
12609+ temp = I915_READ(dspcntr_reg); 12220+ temp = I915_READ(dspcntr_reg);
12610+ if ((temp & DISPLAY_PLANE_ENABLE) != 0) { 12221+ if ((temp & DISPLAY_PLANE_ENABLE) != 0) {
@@ -12613,39 +12224,39 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_display.c
12613+ I915_WRITE(dspbase_reg, I915_READ(dspbase_reg)); 12224+ I915_WRITE(dspbase_reg, I915_READ(dspbase_reg));
12614+ I915_READ(dspbase_reg); 12225+ I915_READ(dspbase_reg);
12615+ } 12226+ }
12616+ 12227+
12617+ if (!IS_I9XX(dev)) { 12228+ if (!IS_I9XX(dev)) {
12618+ /* Wait for vblank for the disable to take effect */ 12229+ /* Wait for vblank for the disable to take effect */
12619+ intel_wait_for_vblank(dev); 12230+ intel_wait_for_vblank(dev);
12620+ } 12231+ }
12621+ 12232+
12622+ /* Next, disable display pipes */ 12233+ /* Next, disable display pipes */
12623+ temp = I915_READ(pipeconf_reg); 12234+ temp = I915_READ(pipeconf_reg);
12624+ if ((temp & PIPEACONF_ENABLE) != 0) { 12235+ if ((temp & PIPEACONF_ENABLE) != 0) {
12625+ I915_WRITE(pipeconf_reg, temp & ~PIPEACONF_ENABLE); 12236+ I915_WRITE(pipeconf_reg, temp & ~PIPEACONF_ENABLE);
12626+ I915_READ(pipeconf_reg); 12237+ I915_READ(pipeconf_reg);
12627+ } 12238+ }
12628+ 12239+
12629+ /* Wait for vblank for the disable to take effect. */ 12240+ /* Wait for vblank for the disable to take effect. */
12630+ intel_wait_for_vblank(dev); 12241+ intel_wait_for_vblank(dev);
12631+ 12242+
12632+ temp = I915_READ(dpll_reg); 12243+ temp = I915_READ(dpll_reg);
12633+ if ((temp & DPLL_VCO_ENABLE) != 0) { 12244+ if ((temp & DPLL_VCO_ENABLE) != 0) {
12634+ I915_WRITE(dpll_reg, temp & ~DPLL_VCO_ENABLE); 12245+ I915_WRITE(dpll_reg, temp & ~DPLL_VCO_ENABLE);
12635+ I915_READ(dpll_reg); 12246+ I915_READ(dpll_reg);
12636+ } 12247+ }
12637+ 12248+
12638+ /* Wait for the clocks to turn off. */ 12249+ /* Wait for the clocks to turn off. */
12639+ udelay(150); 12250+ udelay(150);
12640+ break; 12251+ break;
12641+ } 12252+ }
12642+ 12253+
12643+ 12254+
12644+ if (!dev_priv->sarea_priv) 12255+ if (!dev_priv->sarea_priv)
12645+ return; 12256+ return;
12646+ 12257+
12647+ enabled = crtc->enabled && mode != DPMSModeOff; 12258+ enabled = crtc->enabled && mode != DPMSModeOff;
12648+ 12259+
12649+ switch (pipe) { 12260+ switch (pipe) {
12650+ case 0: 12261+ case 0:
12651+ dev_priv->sarea_priv->planeA_w = enabled ? crtc->mode.hdisplay : 0; 12262+ dev_priv->sarea_priv->planeA_w = enabled ? crtc->mode.hdisplay : 0;
@@ -12727,7 +12338,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_display.c
12727+ u16 gcfgc = 0; 12338+ u16 gcfgc = 0;
12728+ 12339+
12729+ pci_read_config_word(dev->pdev, I915_GCFGC, &gcfgc); 12340+ pci_read_config_word(dev->pdev, I915_GCFGC, &gcfgc);
12730+ 12341+
12731+ if (gcfgc & I915_LOW_FREQUENCY_ENABLE) 12342+ if (gcfgc & I915_LOW_FREQUENCY_ENABLE)
12732+ return 133000; 12343+ return 133000;
12733+ else { 12344+ else {
@@ -12745,7 +12356,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_display.c
12745+#if 0 12356+#if 0
12746+ PCITAG bridge = pciTag(0, 0, 0); /* This is always the host bridge */ 12357+ PCITAG bridge = pciTag(0, 0, 0); /* This is always the host bridge */
12747+ u16 hpllcc = pciReadWord(bridge, I855_HPLLCC); 12358+ u16 hpllcc = pciReadWord(bridge, I855_HPLLCC);
12748+ 12359+
12749+#endif 12360+#endif
12750+ u16 hpllcc = 0; 12361+ u16 hpllcc = 0;
12751+ /* Assume that the hardware is in the high speed state. This 12362+ /* Assume that the hardware is in the high speed state. This
@@ -12762,7 +12373,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_display.c
12762+ } 12373+ }
12763+ } else /* 852, 830 */ 12374+ } else /* 852, 830 */
12764+ return 133000; 12375+ return 133000;
12765+ 12376+
12766+ return 0; /* Silence gcc warning */ 12377+ return 0; /* Silence gcc warning */
12767+} 12378+}
12768+ 12379+
@@ -12775,21 +12386,21 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_display.c
12775+{ 12386+{
12776+ DRM_DRIVER_PRIVATE_T *dev_priv = dev->dev_private; 12387+ DRM_DRIVER_PRIVATE_T *dev_priv = dev->dev_private;
12777+ u32 pfit_control; 12388+ u32 pfit_control;
12778+ 12389+
12779+ /* i830 doesn't have a panel fitter */ 12390+ /* i830 doesn't have a panel fitter */
12780+ if (IS_I830(dev)) 12391+ if (IS_I830(dev))
12781+ return -1; 12392+ return -1;
12782+ 12393+
12783+ pfit_control = I915_READ(PFIT_CONTROL); 12394+ pfit_control = I915_READ(PFIT_CONTROL);
12784+ 12395+
12785+ /* See if the panel fitter is in use */ 12396+ /* See if the panel fitter is in use */
12786+ if ((pfit_control & PFIT_ENABLE) == 0) 12397+ if ((pfit_control & PFIT_ENABLE) == 0)
12787+ return -1; 12398+ return -1;
12788+ 12399+
12789+ /* 965 can place panel fitter on either pipe */ 12400+ /* 965 can place panel fitter on either pipe */
12790+ if (IS_I965G(dev)) 12401+ if (IS_I965G(dev))
12791+ return (pfit_control >> 29) & 0x3; 12402+ return (pfit_control >> 29) & 0x3;
12792+ 12403+
12793+ /* older chips can only use pipe 1 */ 12404+ /* older chips can only use pipe 1 */
12794+ return 1; 12405+ return 1;
12795+} 12406+}
@@ -12926,7 +12537,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_display.c
12926+ I915_WRITE(VGACNTRL, vgacntrl_reg_value[pipe]); 12537+ I915_WRITE(VGACNTRL, vgacntrl_reg_value[pipe]);
12927+ intel_wait_for_vblank(dev); 12538+ intel_wait_for_vblank(dev);
12928+ I915_WRITE(PFIT_CONTROL, pfit_control_reg_value[pipe]); 12539+ I915_WRITE(PFIT_CONTROL, pfit_control_reg_value[pipe]);
12929+ 12540+
12930+ intel_crtc_commit(crtc); 12541+ intel_crtc_commit(crtc);
12931+ list_for_each_entry(output, &mode_config->output_list, head) { 12542+ list_for_each_entry(output, &mode_config->output_list, head) {
12932+ if (output->crtc != crtc) 12543+ if (output->crtc != crtc)
@@ -12990,7 +12601,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_display.c
12990+ break; 12601+ break;
12991+ } 12602+ }
12992+ } 12603+ }
12993+ 12604+
12994+ fp_reg_value[pipe] = I915_READ(fp_reg); 12605+ fp_reg_value[pipe] = I915_READ(fp_reg);
12995+ dpll_reg_value[pipe] = I915_READ(dpll_reg); 12606+ dpll_reg_value[pipe] = I915_READ(dpll_reg);
12996+ dpll_md_reg_value[pipe] = I915_READ(dpll_md_reg); 12607+ dpll_md_reg_value[pipe] = I915_READ(dpll_md_reg);
@@ -13075,7 +12686,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_display.c
13075+ break; 12686+ break;
13076+ } 12687+ }
13077+ } 12688+ }
13078+ 12689+
13079+ if (IS_I9XX(dev)) { 12690+ if (IS_I9XX(dev)) {
13080+ refclk = 96000; 12691+ refclk = 96000;
13081+ } else { 12692+ } else {
@@ -13089,7 +12700,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_display.c
13089+ } 12700+ }
13090+ 12701+
13091+ fp = clock.n << 16 | clock.m1 << 8 | clock.m2; 12702+ fp = clock.n << 16 | clock.m1 << 8 | clock.m2;
13092+ 12703+
13093+ dpll = DPLL_VGA_MODE_DIS; 12704+ dpll = DPLL_VGA_MODE_DIS;
13094+ if (IS_I9XX(dev)) { 12705+ if (IS_I9XX(dev)) {
13095+ if (is_lvds) { 12706+ if (is_lvds) {
@@ -13105,7 +12716,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_display.c
13105+ dpll |= (sdvo_pixel_multiply - 1) << SDVO_MULTIPLIER_SHIFT_HIRES; 12716+ dpll |= (sdvo_pixel_multiply - 1) << SDVO_MULTIPLIER_SHIFT_HIRES;
13106+ } 12717+ }
13107+ } 12718+ }
13108+ 12719+
13109+ /* compute bitmask from p1 value */ 12720+ /* compute bitmask from p1 value */
13110+ dpll |= (1 << (clock.p1 - 1)) << 16; 12721+ dpll |= (1 << (clock.p1 - 1)) << 16;
13111+ switch (clock.p2) { 12722+ switch (clock.p2) {
@@ -13136,7 +12747,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_display.c
13136+ dpll |= PLL_P2_DIVIDE_BY_4; 12747+ dpll |= PLL_P2_DIVIDE_BY_4;
13137+ } 12748+ }
13138+ } 12749+ }
13139+ 12750+
13140+ if (is_tv) { 12751+ if (is_tv) {
13141+ /* XXX: just matching BIOS for now */ 12752+ /* XXX: just matching BIOS for now */
13142+/* dpll |= PLL_REF_INPUT_TVCLKINBC; */ 12753+/* dpll |= PLL_REF_INPUT_TVCLKINBC; */
@@ -13148,7 +12759,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_display.c
13148+#endif 12759+#endif
13149+ else 12760+ else
13150+ dpll |= PLL_REF_INPUT_DREFCLK; 12761+ dpll |= PLL_REF_INPUT_DREFCLK;
13151+ 12762+
13152+ /* setup pipeconf */ 12763+ /* setup pipeconf */
13153+ pipeconf = I915_READ(pipeconf_reg); 12764+ pipeconf = I915_READ(pipeconf_reg);
13154+ 12765+
@@ -13172,13 +12783,13 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_display.c
13172+ DRM_ERROR("Unknown color depth\n"); 12783+ DRM_ERROR("Unknown color depth\n");
13173+ return; 12784+ return;
13174+ } 12785+ }
13175+ 12786+
13176+ 12787+
13177+ if (pipe == 0) 12788+ if (pipe == 0)
13178+ dspcntr |= DISPPLANE_SEL_PIPE_A; 12789+ dspcntr |= DISPPLANE_SEL_PIPE_A;
13179+ else 12790+ else
13180+ dspcntr |= DISPPLANE_SEL_PIPE_B; 12791+ dspcntr |= DISPPLANE_SEL_PIPE_B;
13181+ 12792+
13182+ if (pipe == 0 && !IS_I965G(dev)) { 12793+ if (pipe == 0 && !IS_I965G(dev)) {
13183+ /* Enable pixel doubling when the dot clock is > 90% of the (display) 12794+ /* Enable pixel doubling when the dot clock is > 90% of the (display)
13184+ * core speed. 12795+ * core speed.
@@ -13196,7 +12807,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_display.c
13196+ pipeconf |= PIPEACONF_ENABLE; 12807+ pipeconf |= PIPEACONF_ENABLE;
13197+ dpll |= DPLL_VCO_ENABLE; 12808+ dpll |= DPLL_VCO_ENABLE;
13198+ 12809+
13199+ 12810+
13200+ /* Disable the panel fitter if it was on our pipe */ 12811+ /* Disable the panel fitter if it was on our pipe */
13201+ if (intel_panel_fitter_pipe(dev) == pipe) 12812+ if (intel_panel_fitter_pipe(dev) == pipe)
13202+ I915_WRITE(PFIT_CONTROL, 0); 12813+ I915_WRITE(PFIT_CONTROL, 0);
@@ -13206,7 +12817,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_display.c
13206+ 12817+
13207+ /*psbPrintPll("chosen", &clock);*/ 12818+ /*psbPrintPll("chosen", &clock);*/
13208+ DRM_DEBUG("clock regs: 0x%08x, 0x%08x,dspntr is 0x%8x, pipeconf is 0x%8x\n", (int)dpll, 12819+ DRM_DEBUG("clock regs: 0x%08x, 0x%08x,dspntr is 0x%8x, pipeconf is 0x%8x\n", (int)dpll,
13209+ (int)fp,(int)dspcntr,(int)pipeconf); 12820+ (int)fp,(int)dspcntr,(int)pipeconf);
13210+#if 0 12821+#if 0
13211+ if (!xf86ModesEqual(mode, adjusted_mode)) { 12822+ if (!xf86ModesEqual(mode, adjusted_mode)) {
13212+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, 12823+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
@@ -13222,14 +12833,14 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_display.c
13222+ I915_READ(dpll_reg); 12833+ I915_READ(dpll_reg);
13223+ udelay(150); 12834+ udelay(150);
13224+ } 12835+ }
13225+ 12836+
13226+ /* The LVDS pin pair needs to be on before the DPLLs are enabled. 12837+ /* The LVDS pin pair needs to be on before the DPLLs are enabled.
13227+ * This is an exception to the general rule that mode_set doesn't turn 12838+ * This is an exception to the general rule that mode_set doesn't turn
13228+ * things on. 12839+ * things on.
13229+ */ 12840+ */
13230+ if (is_lvds) { 12841+ if (is_lvds) {
13231+ u32 lvds = I915_READ(LVDS); 12842+ u32 lvds = I915_READ(LVDS);
13232+ 12843+
13233+ lvds |= LVDS_PORT_EN | LVDS_A0A2_CLKA_POWER_UP | LVDS_PIPEB_SELECT; 12844+ lvds |= LVDS_PORT_EN | LVDS_A0A2_CLKA_POWER_UP | LVDS_PIPEB_SELECT;
13234+ /* Set the B0-B3 data pairs corresponding to whether we're going to 12845+ /* Set the B0-B3 data pairs corresponding to whether we're going to
13235+ * set the DPLLs for dual-channel mode or not. 12846+ * set the DPLLs for dual-channel mode or not.
@@ -13238,22 +12849,22 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_display.c
13238+ lvds |= LVDS_B0B3_POWER_UP | LVDS_CLKB_POWER_UP; 12849+ lvds |= LVDS_B0B3_POWER_UP | LVDS_CLKB_POWER_UP;
13239+ else 12850+ else
13240+ lvds &= ~(LVDS_B0B3_POWER_UP | LVDS_CLKB_POWER_UP); 12851+ lvds &= ~(LVDS_B0B3_POWER_UP | LVDS_CLKB_POWER_UP);
13241+ 12852+
13242+ /* It would be nice to set 24 vs 18-bit mode (LVDS_A3_POWER_UP) 12853+ /* It would be nice to set 24 vs 18-bit mode (LVDS_A3_POWER_UP)
13243+ * appropriately here, but we need to look more thoroughly into how 12854+ * appropriately here, but we need to look more thoroughly into how
13244+ * panels behave in the two modes. 12855+ * panels behave in the two modes.
13245+ */ 12856+ */
13246+ 12857+
13247+ I915_WRITE(LVDS, lvds); 12858+ I915_WRITE(LVDS, lvds);
13248+ I915_READ(LVDS); 12859+ I915_READ(LVDS);
13249+ } 12860+ }
13250+ 12861+
13251+ I915_WRITE(fp_reg, fp); 12862+ I915_WRITE(fp_reg, fp);
13252+ I915_WRITE(dpll_reg, dpll); 12863+ I915_WRITE(dpll_reg, dpll);
13253+ I915_READ(dpll_reg); 12864+ I915_READ(dpll_reg);
13254+ /* Wait for the clocks to stabilize. */ 12865+ /* Wait for the clocks to stabilize. */
13255+ udelay(150); 12866+ udelay(150);
13256+ 12867+
13257+ if (IS_I965G(dev)) { 12868+ if (IS_I965G(dev)) {
13258+ int sdvo_pixel_multiply = adjusted_mode->clock / mode->clock; 12869+ int sdvo_pixel_multiply = adjusted_mode->clock / mode->clock;
13259+ I915_WRITE(dpll_md_reg, (0 << DPLL_MD_UDI_DIVIDER_SHIFT) | 12870+ I915_WRITE(dpll_md_reg, (0 << DPLL_MD_UDI_DIVIDER_SHIFT) |
@@ -13265,7 +12876,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_display.c
13265+ I915_READ(dpll_reg); 12876+ I915_READ(dpll_reg);
13266+ /* Wait for the clocks to stabilize. */ 12877+ /* Wait for the clocks to stabilize. */
13267+ udelay(150); 12878+ udelay(150);
13268+ 12879+
13269+ I915_WRITE(htot_reg, (adjusted_mode->crtc_hdisplay - 1) | 12880+ I915_WRITE(htot_reg, (adjusted_mode->crtc_hdisplay - 1) |
13270+ ((adjusted_mode->crtc_htotal - 1) << 16)); 12881+ ((adjusted_mode->crtc_htotal - 1) << 16));
13271+ I915_WRITE(hblank_reg, (adjusted_mode->crtc_hblank_start - 1) | 12882+ I915_WRITE(hblank_reg, (adjusted_mode->crtc_hblank_start - 1) |
@@ -13287,14 +12898,14 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_display.c
13287+ I915_WRITE(pipesrc_reg, ((mode->hdisplay - 1) << 16) | (mode->vdisplay - 1)); 12898+ I915_WRITE(pipesrc_reg, ((mode->hdisplay - 1) << 16) | (mode->vdisplay - 1));
13288+ I915_WRITE(pipeconf_reg, pipeconf); 12899+ I915_WRITE(pipeconf_reg, pipeconf);
13289+ I915_READ(pipeconf_reg); 12900+ I915_READ(pipeconf_reg);
13290+ 12901+
13291+ intel_wait_for_vblank(dev); 12902+ intel_wait_for_vblank(dev);
13292+ 12903+
13293+ I915_WRITE(dspcntr_reg, dspcntr); 12904+ I915_WRITE(dspcntr_reg, dspcntr);
13294+ 12905+
13295+ /* Flush the plane changes */ 12906+ /* Flush the plane changes */
13296+ intel_pipe_set_base(crtc, x, y); 12907+ intel_pipe_set_base(crtc, x, y);
13297+ 12908+
13298+#if 0 12909+#if 0
13299+ intel_set_vblank(dev); 12910+ intel_set_vblank(dev);
13300+#endif 12911+#endif
@@ -13302,7 +12913,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_display.c
13302+ /* Disable the VGA plane that we never use */ 12913+ /* Disable the VGA plane that we never use */
13303+ I915_WRITE(VGACNTRL, VGA_DISP_DISABLE); 12914+ I915_WRITE(VGACNTRL, VGA_DISP_DISABLE);
13304+ 12915+
13305+ intel_wait_for_vblank(dev); 12916+ intel_wait_for_vblank(dev);
13306+} 12917+}
13307+ 12918+
13308+/** Loads the palette/gamma unit for the CRTC with the prepared values */ 12919+/** Loads the palette/gamma unit for the CRTC with the prepared values */
@@ -13331,7 +12942,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_display.c
13331+ u16 blue, int regno) 12942+ u16 blue, int regno)
13332+{ 12943+{
13333+ struct intel_crtc *intel_crtc = crtc->driver_private; 12944+ struct intel_crtc *intel_crtc = crtc->driver_private;
13334+ 12945+
13335+ intel_crtc->lut_r[regno] = red >> 8; 12946+ intel_crtc->lut_r[regno] = red >> 8;
13336+ intel_crtc->lut_g[regno] = green >> 8; 12947+ intel_crtc->lut_g[regno] = green >> 8;
13337+ intel_crtc->lut_b[regno] = blue >> 8; 12948+ intel_crtc->lut_b[regno] = blue >> 8;
@@ -13389,7 +13000,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_display.c
13389+ /* XXX: might not be 66MHz */ 13000+ /* XXX: might not be 66MHz */
13390+ i8xx_clock(66000, &clock); 13001+ i8xx_clock(66000, &clock);
13391+ } else 13002+ } else
13392+ i8xx_clock(48000, &clock); 13003+ i8xx_clock(48000, &clock);
13393+ } else { 13004+ } else {
13394+ if (dpll & PLL_P1_DIVIDE_BY_TWO) 13005+ if (dpll & PLL_P1_DIVIDE_BY_TWO)
13395+ clock.p1 = 2; 13006+ clock.p1 = 2;
@@ -13532,7 +13143,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_display.c
13532+ list_for_each_entry(output, &dev->mode_config.output_list, head) { 13143+ list_for_each_entry(output, &dev->mode_config.output_list, head) {
13533+ struct intel_output *intel_output = output->driver_private; 13144+ struct intel_output *intel_output = output->driver_private;
13534+ int crtc_mask = 0, clone_mask = 0; 13145+ int crtc_mask = 0, clone_mask = 0;
13535+ 13146+
13536+ /* valid crtcs */ 13147+ /* valid crtcs */
13537+ switch(intel_output->type) { 13148+ switch(intel_output->type) {
13538+ case INTEL_OUTPUT_DVO: 13149+ case INTEL_OUTPUT_DVO:
@@ -13607,7 +13218,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_display.c
13607Index: linux-2.6.27/drivers/gpu/drm/psb/intel_drv.h 13218Index: linux-2.6.27/drivers/gpu/drm/psb/intel_drv.h
13608=================================================================== 13219===================================================================
13609--- /dev/null 1970-01-01 00:00:00.000000000 +0000 13220--- /dev/null 1970-01-01 00:00:00.000000000 +0000
13610+++ linux-2.6.27/drivers/gpu/drm/psb/intel_drv.h 2009-01-14 11:58:01.000000000 +0000 13221+++ linux-2.6.27/drivers/gpu/drm/psb/intel_drv.h 2009-02-05 13:29:33.000000000 +0000
13611@@ -0,0 +1,91 @@ 13222@@ -0,0 +1,91 @@
13612+/* 13223+/*
13613+ * Copyright (c) 2006 Dave Airlie <airlied@linux.ie> 13224+ * Copyright (c) 2006 Dave Airlie <airlied@linux.ie>
@@ -13634,7 +13245,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_drv.h
13634+#define INTEL_I2C_BUS_DVO 1 13245+#define INTEL_I2C_BUS_DVO 1
13635+#define INTEL_I2C_BUS_SDVO 2 13246+#define INTEL_I2C_BUS_SDVO 2
13636+ 13247+
13637+/* these are outputs from the chip - integrated only 13248+/* these are outputs from the chip - integrated only
13638+ external chips are via DVO or SDVO output */ 13249+ external chips are via DVO or SDVO output */
13639+#define INTEL_OUTPUT_UNUSED 0 13250+#define INTEL_OUTPUT_UNUSED 0
13640+#define INTEL_OUTPUT_ANALOG 1 13251+#define INTEL_OUTPUT_ANALOG 1
@@ -13703,7 +13314,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_drv.h
13703Index: linux-2.6.27/drivers/gpu/drm/psb/intel_lvds.c 13314Index: linux-2.6.27/drivers/gpu/drm/psb/intel_lvds.c
13704=================================================================== 13315===================================================================
13705--- /dev/null 1970-01-01 00:00:00.000000000 +0000 13316--- /dev/null 1970-01-01 00:00:00.000000000 +0000
13706+++ linux-2.6.27/drivers/gpu/drm/psb/intel_lvds.c 2009-01-14 11:58:01.000000000 +0000 13317+++ linux-2.6.27/drivers/gpu/drm/psb/intel_lvds.c 2009-02-05 13:29:33.000000000 +0000
13707@@ -0,0 +1,913 @@ 13318@@ -0,0 +1,913 @@
13708+/* 13319+/*
13709+ * Copyright © 2006-2007 Intel Corporation 13320+ * Copyright © 2006-2007 Intel Corporation
@@ -13754,7 +13365,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_lvds.c
13754+uint8_t blc_brightnesscmd; 13365+uint8_t blc_brightnesscmd;
13755+int lvds_backlight; /* restore backlight to this value */ 13366+int lvds_backlight; /* restore backlight to this value */
13756+ 13367+
13757+struct intel_i2c_chan *lvds_i2c_bus; 13368+struct intel_i2c_chan *lvds_i2c_bus;
13758+u32 CoreClock; 13369+u32 CoreClock;
13759+u32 PWMControlRegFreq; 13370+u32 PWMControlRegFreq;
13760+ 13371+
@@ -13773,7 +13384,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_lvds.c
13773+{ 13384+{
13774+ u8 out_buf[2]; 13385+ u8 out_buf[2];
13775+ struct i2c_msg msgs[] = { 13386+ struct i2c_msg msgs[] = {
13776+ { 13387+ {
13777+ .addr = lvds_i2c_bus->slave_addr, 13388+ .addr = lvds_i2c_bus->slave_addr,
13778+ .flags = 0, 13389+ .flags = 0,
13779+ .len = 2, 13390+ .len = 2,
@@ -13799,7 +13410,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_lvds.c
13799+/** 13410+/**
13800+ * Calculate PWM control register value. 13411+ * Calculate PWM control register value.
13801+ */ 13412+ */
13802+static int 13413+static int
13803+LVDSCalculatePWMCtrlRegFreq(struct drm_device *dev) 13414+LVDSCalculatePWMCtrlRegFreq(struct drm_device *dev)
13804+{ 13415+{
13805+ unsigned long value = 0; 13416+ unsigned long value = 0;
@@ -13857,7 +13468,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_lvds.c
13857+ DRM_DRIVER_PRIVATE_T *dev_priv = dev->dev_private; 13468+ DRM_DRIVER_PRIVATE_T *dev_priv = dev->dev_private;
13858+ //u32 blc_pwm_ctl; 13469+ //u32 blc_pwm_ctl;
13859+ 13470+
13860+ /* 13471+ /*
13861+ blc_pwm_ctl = I915_READ(BLC_PWM_CTL) & ~BACKLIGHT_DUTY_CYCLE_MASK; 13472+ blc_pwm_ctl = I915_READ(BLC_PWM_CTL) & ~BACKLIGHT_DUTY_CYCLE_MASK;
13862+ I915_WRITE(BLC_PWM_CTL, (blc_pwm_ctl | 13473+ I915_WRITE(BLC_PWM_CTL, (blc_pwm_ctl |
13863+ (level << BACKLIGHT_DUTY_CYCLE_SHIFT))); 13474+ (level << BACKLIGHT_DUTY_CYCLE_SHIFT)));
@@ -13906,7 +13517,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_lvds.c
13906+ return BRIGHTNESS_MAX_LEVEL; 13517+ return BRIGHTNESS_MAX_LEVEL;
13907+ /* 13518+ /*
13908+ DRM_DRIVER_PRIVATE_T *dev_priv = dev->dev_private; 13519+ DRM_DRIVER_PRIVATE_T *dev_priv = dev->dev_private;
13909+ 13520+
13910+ return ((I915_READ(BLC_PWM_CTL) & BACKLIGHT_MODULATION_FREQ_MASK) >> 13521+ return ((I915_READ(BLC_PWM_CTL) & BACKLIGHT_MODULATION_FREQ_MASK) >>
13911+ BACKLIGHT_MODULATION_FREQ_SHIFT) * 2; 13522+ BACKLIGHT_MODULATION_FREQ_SHIFT) * 2;
13912+ */ 13523+ */
@@ -14201,7 +13812,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_lvds.c
14201+static int update_bl_status(struct backlight_device *bd) 13812+static int update_bl_status(struct backlight_device *bd)
14202+{ 13813+{
14203+ int value = bd->props.brightness; 13814+ int value = bd->props.brightness;
14204+ 13815+
14205+ struct drm_device *dev = bl_get_data(bd); 13816+ struct drm_device *dev = bl_get_data(bd);
14206+ 13817+
14207+ lvds_backlight = value; 13818+ lvds_backlight = value;
@@ -14235,7 +13846,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_lvds.c
14235+ 13846+
14236+ if (psbbl_device){ 13847+ if (psbbl_device){
14237+ backlight_device_unregister(psbbl_device); 13848+ backlight_device_unregister(psbbl_device);
14238+ } 13849+ }
14239+ if(dev_OpRegion != NULL) 13850+ if(dev_OpRegion != NULL)
14240+ iounmap(dev_OpRegion); 13851+ iounmap(dev_OpRegion);
14241+ intel_i2c_destroy(intel_output->ddc_bus); 13852+ intel_i2c_destroy(intel_output->ddc_bus);
@@ -14288,7 +13899,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_lvds.c
14288+ (int)obj->integer.value); 13899+ (int)obj->integer.value);
14289+ 13900+
14290+ /* look for an LVDS type */ 13901+ /* look for an LVDS type */
14291+ if (obj->integer.value & 0x00000400) 13902+ if (obj->integer.value & 0x00000400)
14292+ found = 1; 13903+ found = 1;
14293+ } 13904+ }
14294+ } 13905+ }
@@ -14344,7 +13955,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_lvds.c
14344+ blc_type = 0; 13955+ blc_type = 0;
14345+ blc_pol = 0; 13956+ blc_pol = 0;
14346+ 13957+
14347+ if (1) { //get the BLC init data from VBT 13958+ if (1) { //get the BLC init data from VBT
14348+ u32 OpRegion_Phys; 13959+ u32 OpRegion_Phys;
14349+ unsigned int OpRegion_Size = 0x100; 13960+ unsigned int OpRegion_Size = 0x100;
14350+ OpRegionPtr OpRegion; 13961+ OpRegionPtr OpRegion;
@@ -14371,7 +13982,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_lvds.c
14371+ OpRegion_NewSize = OpRegion->size * 1024; 13982+ OpRegion_NewSize = OpRegion->size * 1024;
14372+ 13983+
14373+ dev_OpRegionSize = OpRegion_NewSize; 13984+ dev_OpRegionSize = OpRegion_NewSize;
14374+ 13985+
14375+ iounmap(dev_OpRegion); 13986+ iounmap(dev_OpRegion);
14376+ dev_OpRegion = ioremap(OpRegion_Phys, OpRegion_NewSize); 13987+ dev_OpRegion = ioremap(OpRegion_Phys, OpRegion_NewSize);
14377+ } else { 13988+ } else {
@@ -14383,13 +13994,13 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_lvds.c
14383+ DRM_INFO("intel_lvds_init: OpRegion has the VBT address\n"); 13994+ DRM_INFO("intel_lvds_init: OpRegion has the VBT address\n");
14384+ vbt_buf = dev_OpRegion + OFFSET_OPREGION_VBT; 13995+ vbt_buf = dev_OpRegion + OFFSET_OPREGION_VBT;
14385+ vbt = (struct vbt_header *)(dev_OpRegion + OFFSET_OPREGION_VBT); 13996+ vbt = (struct vbt_header *)(dev_OpRegion + OFFSET_OPREGION_VBT);
14386+ } else { 13997+ } else {
14387+ DRM_INFO("intel_lvds_init: No OpRegion, use the bios at fixed address 0xc0000\n"); 13998+ DRM_INFO("intel_lvds_init: No OpRegion, use the bios at fixed address 0xc0000\n");
14388+ bios = phys_to_virt(0xC0000); 13999+ bios = phys_to_virt(0xC0000);
14389+ if(*((u16 *)bios) != 0xAA55){ 14000+ if(*((u16 *)bios) != 0xAA55){
14390+ bios = NULL; 14001+ bios = NULL;
14391+ DRM_ERROR("the bios is incorrect\n"); 14002+ DRM_ERROR("the bios is incorrect\n");
14392+ goto blc_out; 14003+ goto blc_out;
14393+ } 14004+ }
14394+ vbt_off = bios[0x1a] | (bios[0x1a + 1] << 8); 14005+ vbt_off = bios[0x1a] | (bios[0x1a + 1] << 8);
14395+ DRM_INFO("intel_lvds_init: the vbt off is %x\n", vbt_off); 14006+ DRM_INFO("intel_lvds_init: the vbt off is %x\n", vbt_off);
@@ -14458,7 +14069,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_lvds.c
14458+ 14069+
14459+ if(1){ 14070+ if(1){
14460+ //get the Core Clock for calculating MAX PWM value 14071+ //get the Core Clock for calculating MAX PWM value
14461+ //check whether the MaxResEnableInt is 14072+ //check whether the MaxResEnableInt is
14462+ struct pci_dev * pci_root = pci_get_bus_and_slot(0, 0); 14073+ struct pci_dev * pci_root = pci_get_bus_and_slot(0, 0);
14463+ u32 clock; 14074+ u32 clock;
14464+ u32 sku_value = 0; 14075+ u32 sku_value = 0;
@@ -14478,7 +14089,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_lvds.c
14478+ pci_read_config_dword(pci_root, 0xD4, &clock); 14089+ pci_read_config_dword(pci_root, 0xD4, &clock);
14479+ CoreClock = CoreClocks[clock & 0x07]; 14090+ CoreClock = CoreClocks[clock & 0x07];
14480+ DRM_INFO("intel_lvds_init: the CoreClock is %d\n", CoreClock); 14091+ DRM_INFO("intel_lvds_init: the CoreClock is %d\n", CoreClock);
14481+ 14092+
14482+ pci_write_config_dword(pci_root, 0xD0, PCI_PORT5_REG80_FFUSE); 14093+ pci_write_config_dword(pci_root, 0xD0, PCI_PORT5_REG80_FFUSE);
14483+ pci_read_config_dword(pci_root, 0xD4, &sku_value); 14094+ pci_read_config_dword(pci_root, 0xD4, &sku_value);
14484+ sku_bMaxResEnableInt = (sku_value & PCI_PORT5_REG80_MAXRES_INT_EN)? true : false; 14095+ sku_bMaxResEnableInt = (sku_value & PCI_PORT5_REG80_MAXRES_INT_EN)? true : false;
@@ -14487,7 +14098,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_lvds.c
14487+ } 14098+ }
14488+ } 14099+ }
14489+ 14100+
14490+ if ((blc_type == BLC_I2C_TYPE) || (blc_type == BLC_PWM_TYPE)){ 14101+ if ((blc_type == BLC_I2C_TYPE) || (blc_type == BLC_PWM_TYPE)){
14491+ /* add /sys/class/backlight interface as standard */ 14102+ /* add /sys/class/backlight interface as standard */
14492+ psbbl_device = backlight_device_register("psblvds", &dev->pdev->dev, dev, &psbbl_ops); 14103+ psbbl_device = backlight_device_register("psblvds", &dev->pdev->dev, dev, &psbbl_ops);
14493+ if (psbbl_device){ 14104+ if (psbbl_device){
@@ -14517,7 +14128,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_lvds.c
14517+ 14128+
14518+ list_for_each_entry(scan, &output->probed_modes, head) { 14129+ list_for_each_entry(scan, &output->probed_modes, head) {
14519+ if (scan->type & DRM_MODE_TYPE_PREFERRED) { 14130+ if (scan->type & DRM_MODE_TYPE_PREFERRED) {
14520+ dev_priv->panel_fixed_mode = 14131+ dev_priv->panel_fixed_mode =
14521+ drm_mode_duplicate(dev, scan); 14132+ drm_mode_duplicate(dev, scan);
14522+ goto out; /* FIXME: check for quirks */ 14133+ goto out; /* FIXME: check for quirks */
14523+ } 14134+ }
@@ -14531,7 +14142,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_lvds.c
14531+ lvds = I915_READ(LVDS); 14142+ lvds = I915_READ(LVDS);
14532+ pipe = (lvds & LVDS_PIPEB_SELECT) ? 1 : 0; 14143+ pipe = (lvds & LVDS_PIPEB_SELECT) ? 1 : 0;
14533+ crtc = intel_get_crtc_from_pipe(dev, pipe); 14144+ crtc = intel_get_crtc_from_pipe(dev, pipe);
14534+ 14145+
14535+ if (crtc && (lvds & LVDS_PORT_EN)) { 14146+ if (crtc && (lvds & LVDS_PORT_EN)) {
14536+ dev_priv->panel_fixed_mode = intel_crtc_mode_get(dev, crtc); 14147+ dev_priv->panel_fixed_mode = intel_crtc_mode_get(dev, crtc);
14537+ if (dev_priv->panel_fixed_mode) { 14148+ if (dev_priv->panel_fixed_mode) {
@@ -14621,7 +14232,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_lvds.c
14621Index: linux-2.6.27/drivers/gpu/drm/psb/intel_lvds.h 14232Index: linux-2.6.27/drivers/gpu/drm/psb/intel_lvds.h
14622=================================================================== 14233===================================================================
14623--- /dev/null 1970-01-01 00:00:00.000000000 +0000 14234--- /dev/null 1970-01-01 00:00:00.000000000 +0000
14624+++ linux-2.6.27/drivers/gpu/drm/psb/intel_lvds.h 2009-01-14 11:58:01.000000000 +0000 14235+++ linux-2.6.27/drivers/gpu/drm/psb/intel_lvds.h 2009-02-05 13:29:33.000000000 +0000
14625@@ -0,0 +1,174 @@ 14236@@ -0,0 +1,174 @@
14626+/* 14237+/*
14627+ * Copyright © 2006-2007 Intel Corporation 14238+ * Copyright © 2006-2007 Intel Corporation
@@ -14662,10 +14273,10 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_lvds.h
14662+#define BLC_MAX_PWM_REG_FREQ 0xfffe 14273+#define BLC_MAX_PWM_REG_FREQ 0xfffe
14663+#define BLC_MIN_PWM_REG_FREQ 0x2 14274+#define BLC_MIN_PWM_REG_FREQ 0x2
14664+#define BLC_PWM_LEGACY_MODE_ENABLE 0x0001 14275+#define BLC_PWM_LEGACY_MODE_ENABLE 0x0001
14665+#define BLC_PWM_PRECISION_FACTOR 10//10000000 14276+#define BLC_PWM_PRECISION_FACTOR 10//10000000
14666+#define BLC_PWM_FREQ_CALC_CONSTANT 32 14277+#define BLC_PWM_FREQ_CALC_CONSTANT 32
14667+#define MHz 1000000 14278+#define MHz 1000000
14668+#define OFFSET_OPREGION_VBT 0x400 14279+#define OFFSET_OPREGION_VBT 0x400
14669+ 14280+
14670+typedef struct OpRegion_Header 14281+typedef struct OpRegion_Header
14671+{ 14282+{
@@ -14700,7 +14311,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_lvds.h
14700+ u16 version; /**< decimal */ 14311+ u16 version; /**< decimal */
14701+ u16 header_size; /**< in bytes */ 14312+ u16 header_size; /**< in bytes */
14702+ u16 bdb_size; /**< in bytes */ 14313+ u16 bdb_size; /**< in bytes */
14703+} __attribute__ ((packed)); 14314+} __attribute__ ((packed));
14704+ 14315+
14705+#define LVDS_CAP_EDID (1 << 6) 14316+#define LVDS_CAP_EDID (1 << 6)
14706+#define LVDS_CAP_DITHER (1 << 5) 14317+#define LVDS_CAP_DITHER (1 << 5)
@@ -14800,7 +14411,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_lvds.h
14800Index: linux-2.6.27/drivers/gpu/drm/psb/intel_modes.c 14411Index: linux-2.6.27/drivers/gpu/drm/psb/intel_modes.c
14801=================================================================== 14412===================================================================
14802--- /dev/null 1970-01-01 00:00:00.000000000 +0000 14413--- /dev/null 1970-01-01 00:00:00.000000000 +0000
14803+++ linux-2.6.27/drivers/gpu/drm/psb/intel_modes.c 2009-01-14 11:58:01.000000000 +0000 14414+++ linux-2.6.27/drivers/gpu/drm/psb/intel_modes.c 2009-02-05 13:29:33.000000000 +0000
14804@@ -0,0 +1,60 @@ 14415@@ -0,0 +1,60 @@
14805+/* 14416+/*
14806+ * Copyright (c) 2007 Dave Airlie <airlied@linux.ie> 14417+ * Copyright (c) 2007 Dave Airlie <airlied@linux.ie>
@@ -14865,7 +14476,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_modes.c
14865Index: linux-2.6.27/drivers/gpu/drm/psb/intel_sdvo.c 14476Index: linux-2.6.27/drivers/gpu/drm/psb/intel_sdvo.c
14866=================================================================== 14477===================================================================
14867--- /dev/null 1970-01-01 00:00:00.000000000 +0000 14478--- /dev/null 1970-01-01 00:00:00.000000000 +0000
14868+++ linux-2.6.27/drivers/gpu/drm/psb/intel_sdvo.c 2009-01-14 11:58:01.000000000 +0000 14479+++ linux-2.6.27/drivers/gpu/drm/psb/intel_sdvo.c 2009-02-05 13:29:33.000000000 +0000
14869@@ -0,0 +1,3973 @@ 14480@@ -0,0 +1,3973 @@
14870+/* 14481+/*
14871+ * Copyright © 2006-2007 Intel Corporation 14482+ * Copyright © 2006-2007 Intel Corporation
@@ -15026,7 +14637,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_sdvo.c
15026+ EXTVDATA OverScanY; /* Vertical Overscan : for TV onl */ 14637+ EXTVDATA OverScanY; /* Vertical Overscan : for TV onl */
15027+ EXTVDATA OverScanX; /* Horizontal Overscan : for TV onl */ 14638+ EXTVDATA OverScanX; /* Horizontal Overscan : for TV onl */
15028+ sdvo_display_params dispParams; 14639+ sdvo_display_params dispParams;
15029+ SDVO_ANCILLARY_INFO_T AncillaryInfo; 14640+ SDVO_ANCILLARY_INFO_T AncillaryInfo;
15030+}; 14641+};
15031+ 14642+
15032+/* Define TV mode type */ 14643+/* Define TV mode type */
@@ -15126,7 +14737,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_sdvo.c
15126+#define NUM_TV_MODES sizeof(tv_modes) / sizeof (tv_modes[0]) 14737+#define NUM_TV_MODES sizeof(tv_modes) / sizeof (tv_modes[0])
15127+ 14738+
15128+typedef struct { 14739+typedef struct {
15129+ /* given values */ 14740+ /* given values */
15130+ int n; 14741+ int n;
15131+ int m1, m2; 14742+ int m1, m2;
15132+ int p1, p2; 14743+ int p1, p2;
@@ -15180,12 +14791,12 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_sdvo.c
15180+ int ret; 14791+ int ret;
15181+ 14792+
15182+ struct i2c_msg msgs[] = { 14793+ struct i2c_msg msgs[] = {
15183+ { 14794+ {
15184+ .addr = sdvo_priv->i2c_bus->slave_addr, 14795+ .addr = sdvo_priv->i2c_bus->slave_addr,
15185+ .flags = 0, 14796+ .flags = 0,
15186+ .len = 1, 14797+ .len = 1,
15187+ .buf = out_buf, 14798+ .buf = out_buf,
15188+ }, 14799+ },
15189+ { 14800+ {
15190+ .addr = sdvo_priv->i2c_bus->slave_addr, 14801+ .addr = sdvo_priv->i2c_bus->slave_addr,
15191+ .flags = I2C_M_RD, 14802+ .flags = I2C_M_RD,
@@ -15199,7 +14810,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_sdvo.c
15199+ 14810+
15200+ if ((ret = i2c_transfer(&sdvo_priv->i2c_bus->adapter, msgs, 2)) == 2) 14811+ if ((ret = i2c_transfer(&sdvo_priv->i2c_bus->adapter, msgs, 2)) == 2)
15201+ { 14812+ {
15202+// DRM_DEBUG("got back from addr %02X = %02x\n", out_buf[0], buf[0]); 14813+// DRM_DEBUG("got back from addr %02X = %02x\n", out_buf[0], buf[0]);
15203+ *ch = buf[0]; 14814+ *ch = buf[0];
15204+ return true; 14815+ return true;
15205+ } 14816+ }
@@ -15224,7 +14835,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_sdvo.c
15224+ struct intel_output *intel_output = output->driver_private; 14835+ struct intel_output *intel_output = output->driver_private;
15225+ u8 out_buf[2]; 14836+ u8 out_buf[2];
15226+ struct i2c_msg msgs[] = { 14837+ struct i2c_msg msgs[] = {
15227+ { 14838+ {
15228+ .addr = intel_output->i2c_bus->slave_addr, 14839+ .addr = intel_output->i2c_bus->slave_addr,
15229+ .flags = 0, 14840+ .flags = 0,
15230+ .len = 2, 14841+ .len = 2,
@@ -15313,7 +14924,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_sdvo.c
15313+ printk("(%02X)",cmd); 14924+ printk("(%02X)",cmd);
15314+ printk("\n"); 14925+ printk("\n");
15315+ } 14926+ }
15316+ 14927+
15317+ for (i = 0; i < args_len; i++) { 14928+ for (i = 0; i < args_len; i++) {
15318+ intel_sdvo_write_byte(output, SDVO_I2C_ARG_0 - i, ((u8*)args)[i]); 14929+ intel_sdvo_write_byte(output, SDVO_I2C_ARG_0 - i, ((u8*)args)[i]);
15319+ } 14930+ }
@@ -15473,7 +15084,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_sdvo.c
15473+ state = SDVO_ENCODER_STATE_OFF; 15084+ state = SDVO_ENCODER_STATE_OFF;
15474+ break; 15085+ break;
15475+ } 15086+ }
15476+ 15087+
15477+ intel_sdvo_write_cmd(output, SDVO_CMD_SET_ENCODER_POWER_STATE, &state, 15088+ intel_sdvo_write_cmd(output, SDVO_CMD_SET_ENCODER_POWER_STATE, &state,
15478+ sizeof(state)); 15089+ sizeof(state));
15479+ status = intel_sdvo_read_response(output, NULL, 0); 15090+ status = intel_sdvo_read_response(output, NULL, 0);
@@ -15798,7 +15409,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_sdvo.c
15798+ break; 15409+ break;
15799+ } 15410+ }
15800+} 15411+}
15801+#endif 15412+#endif
15802+ 15413+
15803+static bool i830_sdvo_set_tvoutputs_formats(struct drm_output * output) 15414+static bool i830_sdvo_set_tvoutputs_formats(struct drm_output * output)
15804+{ 15415+{
@@ -16031,7 +15642,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_sdvo.c
16031+ u32 * pHDTVStdMask, u32 *pTVStdFormat) 15642+ u32 * pHDTVStdMask, u32 *pTVStdFormat)
16032+{ 15643+{
16033+ struct intel_output *intel_output = output->driver_private; 15644+ struct intel_output *intel_output = output->driver_private;
16034+ struct intel_sdvo_priv *sdvo_priv = intel_output->dev_priv; 15645+ struct intel_sdvo_priv *sdvo_priv = intel_output->dev_priv;
16035+ 15646+
16036+ u8 byRets[6]; 15647+ u8 byRets[6];
16037+ u8 status; 15648+ u8 status;
@@ -16069,7 +15680,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_sdvo.c
16069+ else 15680+ else
16070+ *pTVStdFormat = (((u32) byRets[2] & 0xF8) | 15681+ *pTVStdFormat = (((u32) byRets[2] & 0xF8) |
16071+ ((u32) byRets[3] << 8) | 15682+ ((u32) byRets[3] << 8) |
16072+ ((u32) byRets[4] << 16) | ((u32) byRets[5] << 24)); 15683+ ((u32) byRets[4] << 16) | ((u32) byRets[5] << 24));
16073+ DRM_DEBUG("BIOS TV format is %d\n",*pTVStdFormat); 15684+ DRM_DEBUG("BIOS TV format is %d\n",*pTVStdFormat);
16074+ return TRUE; 15685+ return TRUE;
16075+ 15686+
@@ -17681,7 +17292,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_sdvo.c
17681+ if (!crtc->fb) { 17292+ if (!crtc->fb) {
17682+ DRM_ERROR("Can't set mode without attached fb\n"); 17293+ DRM_ERROR("Can't set mode without attached fb\n");
17683+ return; 17294+ return;
17684+ } 17295+ }
17685+ is_sdvo = TRUE; 17296+ is_sdvo = TRUE;
17686+ ok = TRUE; 17297+ ok = TRUE;
17687+ ulDotClock = mode->clock * 1000 / 1000; /*xiaolin, fixme, do i need to by 1k hz */ 17298+ ulDotClock = mode->clock * 1000 / 1000; /*xiaolin, fixme, do i need to by 1k hz */
@@ -17707,7 +17318,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_sdvo.c
17707+ clock.m1 = 0x10; 17318+ clock.m1 = 0x10;
17708+ clock.m2 = 0x8; 17319+ clock.m2 = 0x8;
17709+ } else if ((dotclock >= 140500) && (dotclock <= 200000)) { 17320+ } else if ((dotclock >= 140500) && (dotclock <= 200000)) {
17710+ 17321+
17711+ DRM_DEBUG("dotclock is between 140500 and 200000!\n"); 17322+ DRM_DEBUG("dotclock is between 140500 and 200000!\n");
17712+ clock.p1 = 0x1; 17323+ clock.p1 = 0x1;
17713+ /*CG was using 0x10 from spreadsheet it should be 0 */ 17324+ /*CG was using 0x10 from spreadsheet it should be 0 */
@@ -17775,7 +17386,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_sdvo.c
17775+ else 17386+ else
17776+ { pipeconf &= ~PIPEACONF_DOUBLE_WIDE; DRM_DEBUG("non PIPEACONF_DOUBLE_WIDE\n");} 17387+ { pipeconf &= ~PIPEACONF_DOUBLE_WIDE; DRM_DEBUG("non PIPEACONF_DOUBLE_WIDE\n");}
17777+ } 17388+ }
17778+ 17389+
17779+ dspcntr |= DISPLAY_PLANE_ENABLE; 17390+ dspcntr |= DISPLAY_PLANE_ENABLE;
17780+ pipeconf |= PIPEACONF_ENABLE; 17391+ pipeconf |= PIPEACONF_ENABLE;
17781+ dpll |= DPLL_VCO_ENABLE; 17392+ dpll |= DPLL_VCO_ENABLE;
@@ -17786,12 +17397,12 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_sdvo.c
17786+ 17397+
17787+ print_Pll("chosen", &clock); 17398+ print_Pll("chosen", &clock);
17788+ DRM_DEBUG("Mode for pipe %c:\n", pipe == 0 ? 'A' : 'B'); 17399+ DRM_DEBUG("Mode for pipe %c:\n", pipe == 0 ? 'A' : 'B');
17789+ drm_mode_debug_printmodeline(dev, mode); 17400+ drm_mode_debug_printmodeline(dev, mode);
17790+ DRM_DEBUG("Modeline %d:\"%s\" %d %d %d %d %d %d %d %d\n", 17401+ DRM_DEBUG("Modeline %d:\"%s\" %d %d %d %d %d %d %d %d\n",
17791+ mode->mode_id, mode->name, mode->crtc_htotal, mode->crtc_hdisplay, 17402+ mode->mode_id, mode->name, mode->crtc_htotal, mode->crtc_hdisplay,
17792+ mode->crtc_hblank_end, mode->crtc_hblank_start, 17403+ mode->crtc_hblank_end, mode->crtc_hblank_start,
17793+ mode->crtc_vtotal, mode->crtc_vdisplay, 17404+ mode->crtc_vtotal, mode->crtc_vdisplay,
17794+ mode->crtc_vblank_end, mode->crtc_vblank_start); 17405+ mode->crtc_vblank_end, mode->crtc_vblank_start);
17795+ DRM_DEBUG("clock regs: 0x%08x, 0x%08x,dspntr is 0x%8x, pipeconf is 0x%8x\n", (int)dpll, 17406+ DRM_DEBUG("clock regs: 0x%08x, 0x%08x,dspntr is 0x%8x, pipeconf is 0x%8x\n", (int)dpll,
17796+ (int)fp,(int)dspcntr,(int)pipeconf); 17407+ (int)fp,(int)dspcntr,(int)pipeconf);
17797+ 17408+
@@ -17851,14 +17462,14 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_sdvo.c
17851+ } 17462+ }
17852+ I915_WRITE(pipeconf_reg, pipeconf); 17463+ I915_WRITE(pipeconf_reg, pipeconf);
17853+ I915_READ(pipeconf_reg); 17464+ I915_READ(pipeconf_reg);
17854+ 17465+
17855+ intel_wait_for_vblank(dev); 17466+ intel_wait_for_vblank(dev);
17856+ 17467+
17857+ I915_WRITE(dspcntr_reg, dspcntr); 17468+ I915_WRITE(dspcntr_reg, dspcntr);
17858+ /* Flush the plane changes */ 17469+ /* Flush the plane changes */
17859+ //intel_pipe_set_base(crtc, 0, 0); 17470+ //intel_pipe_set_base(crtc, 0, 0);
17860+ /* Disable the VGA plane that we never use */ 17471+ /* Disable the VGA plane that we never use */
17861+ //I915_WRITE(VGACNTRL, VGA_DISP_DISABLE); 17472+ //I915_WRITE(VGACNTRL, VGA_DISP_DISABLE);
17862+ //intel_wait_for_vblank(dev); 17473+ //intel_wait_for_vblank(dev);
17863+ 17474+
17864+} 17475+}
@@ -17890,7 +17501,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_sdvo.c
17890+ mode = &tv_modes[0].mode_entry; 17501+ mode = &tv_modes[0].mode_entry;
17891+ drm_mode_set_crtcinfo(mode, 0); 17502+ drm_mode_set_crtcinfo(mode, 0);
17892+ } 17503+ }
17893+ } 17504+ }
17894+ save_mode = mode; 17505+ save_mode = mode;
17895+#if 0 17506+#if 0
17896+ width = mode->crtc_hdisplay; 17507+ width = mode->crtc_hdisplay;
@@ -17915,7 +17526,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_sdvo.c
17915+ output_dtd.part1.v_blank = v_blank_len & 0xff; 17526+ output_dtd.part1.v_blank = v_blank_len & 0xff;
17916+ output_dtd.part1.v_high = (((height >> 8) & 0xf) << 4) | 17527+ output_dtd.part1.v_high = (((height >> 8) & 0xf) << 4) |
17917+ ((v_blank_len >> 8) & 0xf); 17528+ ((v_blank_len >> 8) & 0xf);
17918+ 17529+
17919+ output_dtd.part2.h_sync_off = h_sync_offset; 17530+ output_dtd.part2.h_sync_off = h_sync_offset;
17920+ output_dtd.part2.h_sync_width = h_sync_len & 0xff; 17531+ output_dtd.part2.h_sync_width = h_sync_len & 0xff;
17921+ output_dtd.part2.v_sync_off_width = (v_sync_offset & 0xf) << 4 | 17532+ output_dtd.part2.v_sync_off_width = (v_sync_offset & 0xf) << 4 |
@@ -17923,7 +17534,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_sdvo.c
17923+ output_dtd.part2.sync_off_width_high = ((h_sync_offset & 0x300) >> 2) | 17534+ output_dtd.part2.sync_off_width_high = ((h_sync_offset & 0x300) >> 2) |
17924+ ((h_sync_len & 0x300) >> 4) | ((v_sync_offset & 0x30) >> 2) | 17535+ ((h_sync_len & 0x300) >> 4) | ((v_sync_offset & 0x30) >> 2) |
17925+ ((v_sync_len & 0x30) >> 4); 17536+ ((v_sync_len & 0x30) >> 4);
17926+ 17537+
17927+ output_dtd.part2.dtd_flags = 0x18; 17538+ output_dtd.part2.dtd_flags = 0x18;
17928+ if (mode->flags & V_PHSYNC) 17539+ if (mode->flags & V_PHSYNC)
17929+ output_dtd.part2.dtd_flags |= 0x2; 17540+ output_dtd.part2.dtd_flags |= 0x2;
@@ -17940,9 +17551,9 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_sdvo.c
17940+ //intel_sdvo_set_active_outputs(output, sdvo_priv->active_outputs); 17551+ //intel_sdvo_set_active_outputs(output, sdvo_priv->active_outputs);
17941+ memset(&output_dtd, 0, sizeof(struct intel_sdvo_dtd)); 17552+ memset(&output_dtd, 0, sizeof(struct intel_sdvo_dtd));
17942+ /* check if this mode can be supported or not */ 17553+ /* check if this mode can be supported or not */
17943+ 17554+
17944+ i830_translate_timing2dtd(mode, &output_dtd); 17555+ i830_translate_timing2dtd(mode, &output_dtd);
17945+#endif 17556+#endif
17946+ intel_sdvo_set_target_output(output, 0); 17557+ intel_sdvo_set_target_output(output, 0);
17947+ /* set the target input & output first */ 17558+ /* set the target input & output first */
17948+ /* Set the input timing to the screen. Assume always input 0. */ 17559+ /* Set the input timing to the screen. Assume always input 0. */
@@ -17973,7 +17584,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_sdvo.c
17973+ /* Set the overscan values now as input timing is dependent on overscan values */ 17584+ /* Set the overscan values now as input timing is dependent on overscan values */
17974+ 17585+
17975+ } 17586+ }
17976+ 17587+
17977+ 17588+
17978+ /* We would like to use i830_sdvo_create_preferred_input_timing() to 17589+ /* We would like to use i830_sdvo_create_preferred_input_timing() to
17979+ * provide the device with a timing it can support, if it supports that 17590+ * provide the device with a timing it can support, if it supports that
@@ -17985,16 +17596,16 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_sdvo.c
17985+ width, height); 17596+ width, height);
17986+ if (success) { 17597+ if (success) {
17987+ struct intel_sdvo_dtd *input_dtd; 17598+ struct intel_sdvo_dtd *input_dtd;
17988+ 17599+
17989+ intel_sdvo_get_preferred_input_timing(output, &input_dtd); 17600+ intel_sdvo_get_preferred_input_timing(output, &input_dtd);
17990+ intel_sdvo_set_input_timing(output, &input_dtd); 17601+ intel_sdvo_set_input_timing(output, &input_dtd);
17991+ } 17602+ }
17992+#else 17603+#else
17993+ /* Set input timing (in DTD) */ 17604+ /* Set input timing (in DTD) */
17994+ intel_sdvo_set_input_timing(output, &output_dtd); 17605+ intel_sdvo_set_input_timing(output, &output_dtd);
17995+#endif 17606+#endif
17996+ if (sdvo_priv->ActiveDevice == SDVO_DEVICE_TV) { 17607+ if (sdvo_priv->ActiveDevice == SDVO_DEVICE_TV) {
17997+ 17608+
17998+ DRM_DEBUG("xxintel_sdvo_mode_set tv path\n"); 17609+ DRM_DEBUG("xxintel_sdvo_mode_set tv path\n");
17999+ i830_tv_program_display_params(output); 17610+ i830_tv_program_display_params(output);
18000+ /* translate dtd 2 timing */ 17611+ /* translate dtd 2 timing */
@@ -18030,7 +17641,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_sdvo.c
18030+ intel_sdvo_set_clock_rate_mult(output, 17641+ intel_sdvo_set_clock_rate_mult(output,
18031+ SDVO_CLOCK_RATE_MULT_4X); 17642+ SDVO_CLOCK_RATE_MULT_4X);
18032+ break; 17643+ break;
18033+ } 17644+ }
18034+ } 17645+ }
18035+ /* Set the SDVO control regs. */ 17646+ /* Set the SDVO control regs. */
18036+ if (0/*IS_I965GM(dev)*/) { 17647+ if (0/*IS_I965GM(dev)*/) {
@@ -18052,17 +17663,17 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_sdvo.c
18052+ 17663+
18053+ sdvo_pixel_multiply = intel_sdvo_get_pixel_multiplier(mode); 17664+ sdvo_pixel_multiply = intel_sdvo_get_pixel_multiplier(mode);
18054+ if (IS_I965G(dev)) { 17665+ if (IS_I965G(dev)) {
18055+ /* done in crtc_mode_set as the dpll_md reg must be written 17666+ /* done in crtc_mode_set as the dpll_md reg must be written
18056+ early */ 17667+ early */
18057+ } else if (IS_POULSBO(dev) || IS_I945G(dev) || IS_I945GM(dev)) { 17668+ } else if (IS_POULSBO(dev) || IS_I945G(dev) || IS_I945GM(dev)) {
18058+ /* done in crtc_mode_set as it lives inside the 17669+ /* done in crtc_mode_set as it lives inside the
18059+ dpll register */ 17670+ dpll register */
18060+ } else { 17671+ } else {
18061+ sdvox |= (sdvo_pixel_multiply - 1) << SDVO_PORT_MULTIPLY_SHIFT; 17672+ sdvox |= (sdvo_pixel_multiply - 1) << SDVO_PORT_MULTIPLY_SHIFT;
18062+ } 17673+ }
18063+ 17674+
18064+ intel_sdvo_write_sdvox(output, sdvox); 17675+ intel_sdvo_write_sdvox(output, sdvox);
18065+ i830_sdvo_set_iomap(output); 17676+ i830_sdvo_set_iomap(output);
18066+} 17677+}
18067+ 17678+
18068+static void intel_sdvo_dpms(struct drm_output *output, int mode) 17679+static void intel_sdvo_dpms(struct drm_output *output, int mode)
@@ -18097,18 +17708,18 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_sdvo.c
18097+ bool input1, input2; 17708+ bool input1, input2;
18098+ int i; 17709+ int i;
18099+ u8 status; 17710+ u8 status;
18100+ 17711+
18101+ temp = I915_READ(sdvo_priv->output_device); 17712+ temp = I915_READ(sdvo_priv->output_device);
18102+ if ((temp & SDVO_ENABLE) == 0) 17713+ if ((temp & SDVO_ENABLE) == 0)
18103+ intel_sdvo_write_sdvox(output, temp | SDVO_ENABLE); 17714+ intel_sdvo_write_sdvox(output, temp | SDVO_ENABLE);
18104+ for (i = 0; i < 2; i++) 17715+ for (i = 0; i < 2; i++)
18105+ intel_wait_for_vblank(dev); 17716+ intel_wait_for_vblank(dev);
18106+ 17717+
18107+ status = intel_sdvo_get_trained_inputs(output, &input1, 17718+ status = intel_sdvo_get_trained_inputs(output, &input1,
18108+ &input2); 17719+ &input2);
18109+ 17720+
18110+ 17721+
18111+ /* Warn if the device reported failure to sync. 17722+ /* Warn if the device reported failure to sync.
18112+ * A lot of SDVO devices fail to notify of sync, but it's 17723+ * A lot of SDVO devices fail to notify of sync, but it's
18113+ * a given it the status is a success, we succeeded. 17724+ * a given it the status is a success, we succeeded.
18114+ */ 17725+ */
@@ -18116,13 +17727,13 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_sdvo.c
18116+ DRM_DEBUG("First %s output reported failure to sync\n", 17727+ DRM_DEBUG("First %s output reported failure to sync\n",
18117+ SDVO_NAME(sdvo_priv)); 17728+ SDVO_NAME(sdvo_priv));
18118+ } 17729+ }
18119+ 17730+
18120+ if (0) 17731+ if (0)
18121+ intel_sdvo_set_encoder_power_state(output, mode); 17732+ intel_sdvo_set_encoder_power_state(output, mode);
18122+ 17733+
18123+ DRM_DEBUG("xiaolin active output is %d\n",sdvo_priv->active_outputs); 17734+ DRM_DEBUG("xiaolin active output is %d\n",sdvo_priv->active_outputs);
18124+ intel_sdvo_set_active_outputs(output, sdvo_priv->active_outputs); 17735+ intel_sdvo_set_active_outputs(output, sdvo_priv->active_outputs);
18125+ } 17736+ }
18126+ return; 17737+ return;
18127+} 17738+}
18128+ 17739+
@@ -18152,7 +17763,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_sdvo.c
18152+ 17763+
18153+ intel_sdvo_set_target_output(output, sdvo_priv->active_outputs); 17764+ intel_sdvo_set_target_output(output, sdvo_priv->active_outputs);
18154+ intel_sdvo_get_output_timing(output, 17765+ intel_sdvo_get_output_timing(output,
18155+ &sdvo_priv->save_output_dtd[sdvo_priv->active_outputs]); 17766+ &sdvo_priv->save_output_dtd[sdvo_priv->active_outputs]);
18156+ sdvo_priv->save_SDVOX = I915_READ(sdvo_priv->output_device); 17767+ sdvo_priv->save_SDVOX = I915_READ(sdvo_priv->output_device);
18157+} 17768+}
18158+ 17769+
@@ -18181,11 +17792,11 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_sdvo.c
18181+ intel_sdvo_set_target_input(output, false, true); 17792+ intel_sdvo_set_target_input(output, false, true);
18182+ intel_sdvo_set_input_timing(output, &sdvo_priv->save_input_dtd_2); 17793+ intel_sdvo_set_input_timing(output, &sdvo_priv->save_input_dtd_2);
18183+ } 17794+ }
18184+ 17795+
18185+ intel_sdvo_set_clock_rate_mult(output, sdvo_priv->save_sdvo_mult); 17796+ intel_sdvo_set_clock_rate_mult(output, sdvo_priv->save_sdvo_mult);
18186+ 17797+
18187+ I915_WRITE(sdvo_priv->output_device, sdvo_priv->save_SDVOX); 17798+ I915_WRITE(sdvo_priv->output_device, sdvo_priv->save_SDVOX);
18188+ 17799+
18189+ if (sdvo_priv->save_SDVOX & SDVO_ENABLE) 17800+ if (sdvo_priv->save_SDVOX & SDVO_ENABLE)
18190+ { 17801+ {
18191+ for (i = 0; i < 2; i++) 17802+ for (i = 0; i < 2; i++)
@@ -18195,8 +17806,8 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_sdvo.c
18195+ DRM_DEBUG("First %s output reported failure to sync\n", 17806+ DRM_DEBUG("First %s output reported failure to sync\n",
18196+ SDVO_NAME(sdvo_priv)); 17807+ SDVO_NAME(sdvo_priv));
18197+ } 17808+ }
18198+ 17809+
18199+ i830_sdvo_set_iomap(output); 17810+ i830_sdvo_set_iomap(output);
18200+ intel_sdvo_set_active_outputs(output, sdvo_priv->save_active_outputs); 17811+ intel_sdvo_set_active_outputs(output, sdvo_priv->save_active_outputs);
18201+} 17812+}
18202+ 17813+
@@ -18207,10 +17818,10 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_sdvo.c
18207+ 17818+
18208+ bool find = FALSE; 17819+ bool find = FALSE;
18209+ int i; 17820+ int i;
18210+ 17821+
18211+ DRM_DEBUG("i830_tv_mode_find,0x%x\n", sdvo_priv->TVStandard); 17822+ DRM_DEBUG("i830_tv_mode_find,0x%x\n", sdvo_priv->TVStandard);
18212+ 17823+
18213+ for (i = 0; i < NUM_TV_MODES; i++) 17824+ for (i = 0; i < NUM_TV_MODES; i++)
18214+ { 17825+ {
18215+ const tv_mode_t *tv_mode = &tv_modes[i]; 17826+ const tv_mode_t *tv_mode = &tv_modes[i];
18216+ if (strcmp (tv_mode->mode_entry.name, pMode->name) == 0 17827+ if (strcmp (tv_mode->mode_entry.name, pMode->name) == 0
@@ -18228,7 +17839,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_sdvo.c
18228+{ 17839+{
18229+ struct intel_output *intel_output = output->driver_private; 17840+ struct intel_output *intel_output = output->driver_private;
18230+ struct intel_sdvo_priv *sdvo_priv = intel_output->dev_priv; 17841+ struct intel_sdvo_priv *sdvo_priv = intel_output->dev_priv;
18231+ 17842+
18232+ bool status = TRUE; 17843+ bool status = TRUE;
18233+ DRM_DEBUG("xxintel_sdvo_mode_valid\n"); 17844+ DRM_DEBUG("xxintel_sdvo_mode_valid\n");
18234+ 17845+
@@ -18279,7 +17890,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_sdvo.c
18279+ u32 dwTVStdBitmask = 0; 17890+ u32 dwTVStdBitmask = 0;
18280+ 17891+
18281+ struct intel_output *intel_output = output->driver_private; 17892+ struct intel_output *intel_output = output->driver_private;
18282+ struct intel_sdvo_priv *sdvo_priv = intel_output->dev_priv; 17893+ struct intel_sdvo_priv *sdvo_priv = intel_output->dev_priv;
18283+ 17894+
18284+ 17895+
18285+ /* Get supported TV Standard */ 17896+ /* Get supported TV Standard */
@@ -18302,15 +17913,15 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_sdvo.c
18302+ char *name_suffix; 17913+ char *name_suffix;
18303+ char *name_prefix; 17914+ char *name_prefix;
18304+ unsigned char bytes[2]; 17915+ unsigned char bytes[2];
18305+ 17916+
18306+ struct drm_device *dev = output->dev; 17917+ struct drm_device *dev = output->dev;
18307+ 17918+
18308+ struct intel_output *intel_output = output->driver_private; 17919+ struct intel_output *intel_output = output->driver_private;
18309+ struct intel_sdvo_priv *sdvo_priv = intel_output->dev_priv; 17920+ struct intel_sdvo_priv *sdvo_priv = intel_output->dev_priv;
18310+ 17921+
18311+ DRM_DEBUG("xxintel_sdvo_detect\n"); 17922+ DRM_DEBUG("xxintel_sdvo_detect\n");
18312+ intel_sdvo_dpms(output, DPMSModeOn); 17923+ intel_sdvo_dpms(output, DPMSModeOn);
18313+ 17924+
18314+ if (!intel_sdvo_get_capabilities(output, &sdvo_priv->caps)) { 17925+ if (!intel_sdvo_get_capabilities(output, &sdvo_priv->caps)) {
18315+ /*No SDVO support, power down the pipe */ 17926+ /*No SDVO support, power down the pipe */
18316+ intel_sdvo_dpms(output, DPMSModeOff); 17927+ intel_sdvo_dpms(output, DPMSModeOff);
@@ -18339,10 +17950,10 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_sdvo.c
18339+ 17950+
18340+ if ((status != SDVO_CMD_STATUS_SUCCESS) || (response[0] == 0 && response[1] == 0)) { 17951+ if ((status != SDVO_CMD_STATUS_SUCCESS) || (response[0] == 0 && response[1] == 0)) {
18341+ udelay(500); 17952+ udelay(500);
18342+ continue; 17953+ continue;
18343+ } else 17954+ } else
18344+ break; 17955+ break;
18345+ } 17956+ }
18346+ if (response[0] != 0 || response[1] != 0) { 17957+ if (response[0] != 0 || response[1] != 0) {
18347+ /*Check what device types are connected to the hardware CRT/HDTV/S-Video/Composite */ 17958+ /*Check what device types are connected to the hardware CRT/HDTV/S-Video/Composite */
18348+ /*in case of CRT and multiple TV's attached give preference in the order mentioned below */ 17959+ /*in case of CRT and multiple TV's attached give preference in the order mentioned below */
@@ -18420,9 +18031,9 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_sdvo.c
18420+ /*sdvo_priv->TVStandard = TVSTANDARD_NTSC_M;*/ 18031+ /*sdvo_priv->TVStandard = TVSTANDARD_NTSC_M;*/
18421+ sdvo_priv->TVMode = TVMODE_SDTV; 18032+ sdvo_priv->TVMode = TVMODE_SDTV;
18422+ } 18033+ }
18423+ 18034+
18424+ /*intel_output->pDevice->TVEnabled = TRUE;*/ 18035+ /*intel_output->pDevice->TVEnabled = TRUE;*/
18425+ 18036+
18426+ i830_tv_get_default_params(output); 18037+ i830_tv_get_default_params(output);
18427+ /*Init Display parameter for TV */ 18038+ /*Init Display parameter for TV */
18428+ sdvo_priv->OverScanX.Value = 0xffffffff; 18039+ sdvo_priv->OverScanX.Value = 0xffffffff;
@@ -18441,7 +18052,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_sdvo.c
18441+ sdvo_priv->dispParams.Saturation.Value = 0x45; 18052+ sdvo_priv->dispParams.Saturation.Value = 0x45;
18442+ sdvo_priv->dispParams.Hue.Value = 0x40; 18053+ sdvo_priv->dispParams.Hue.Value = 0x40;
18443+ sdvo_priv->dispParams.Dither.Value = 0; 18054+ sdvo_priv->dispParams.Dither.Value = 0;
18444+ 18055+
18445+ } 18056+ }
18446+ else { 18057+ else {
18447+ name_prefix = "RGB0"; 18058+ name_prefix = "RGB0";
@@ -18474,7 +18085,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_sdvo.c
18474+ intel_sdvo_dpms(output, DPMSModeOff); 18085+ intel_sdvo_dpms(output, DPMSModeOff);
18475+ sdvo_priv->ActiveDevice = SDVO_DEVICE_NONE; 18086+ sdvo_priv->ActiveDevice = SDVO_DEVICE_NONE;
18476+ return output_status_disconnected; 18087+ return output_status_disconnected;
18477+ } 18088+ }
18478+} 18089+}
18479+ 18090+
18480+static int i830_sdvo_get_tvmode_from_table(struct drm_output *output) 18091+static int i830_sdvo_get_tvmode_from_table(struct drm_output *output)
@@ -18491,13 +18102,13 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_sdvo.c
18491+ ((sdvo_priv->TVMode == TVMODE_SDTV) && /*sdtv mode list */ 18102+ ((sdvo_priv->TVMode == TVMODE_SDTV) && /*sdtv mode list */
18492+ (tv_modes[i].dwSupportedSDTVvss & TVSTANDARD_SDTV_ALL))) { 18103+ (tv_modes[i].dwSupportedSDTVvss & TVSTANDARD_SDTV_ALL))) {
18493+ struct drm_display_mode *newmode; 18104+ struct drm_display_mode *newmode;
18494+ newmode = drm_mode_duplicate(dev, &tv_modes[i].mode_entry); 18105+ newmode = drm_mode_duplicate(dev, &tv_modes[i].mode_entry);
18495+ drm_mode_set_crtcinfo(newmode,0); 18106+ drm_mode_set_crtcinfo(newmode,0);
18496+ drm_mode_probed_add(output, newmode); 18107+ drm_mode_probed_add(output, newmode);
18497+ modes++; 18108+ modes++;
18498+ } 18109+ }
18499+ 18110+
18500+ return modes; 18111+ return modes;
18501+ 18112+
18502+} 18113+}
18503+ 18114+
@@ -18527,7 +18138,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_sdvo.c
18527+#if 0 18138+#if 0
18528+ /* Mac mini hack. On this device, I get DDC through the analog, which 18139+ /* Mac mini hack. On this device, I get DDC through the analog, which
18529+ * load-detects as disconnected. I fail to DDC through the SDVO DDC, 18140+ * load-detects as disconnected. I fail to DDC through the SDVO DDC,
18530+ * but it does load-detect as connected. So, just steal the DDC bits 18141+ * but it does load-detect as connected. So, just steal the DDC bits
18531+ * from analog when we fail at finding it the right way. 18142+ * from analog when we fail at finding it the right way.
18532+ */ 18143+ */
18533+ /* TODO */ 18144+ /* TODO */
@@ -18579,11 +18190,11 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_sdvo.c
18579+ 18190+
18580+ int count = 3; 18191+ int count = 3;
18581+ u8 response[2]; 18192+ u8 response[2];
18582+ u8 status; 18193+ u8 status;
18583+ unsigned char bytes[2]; 18194+ unsigned char bytes[2];
18584+ 18195+
18585+ DRM_DEBUG("xxintel_sdvo_init\n"); 18196+ DRM_DEBUG("xxintel_sdvo_init\n");
18586+ 18197+
18587+ if (IS_POULSBO(dev)) { 18198+ if (IS_POULSBO(dev)) {
18588+ struct pci_dev * pci_root = pci_get_bus_and_slot(0, 0); 18199+ struct pci_dev * pci_root = pci_get_bus_and_slot(0, 0);
18589+ u32 sku_value = 0; 18200+ u32 sku_value = 0;
@@ -18788,7 +18399,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_sdvo.c
18788+ name_prefix = "RGB0"; 18399+ name_prefix = "RGB0";
18789+ DRM_INFO("non TV is attaced\n"); 18400+ DRM_INFO("non TV is attaced\n");
18790+ } 18401+ }
18791+ 18402+
18792+ strcpy(name, name_prefix); 18403+ strcpy(name, name_prefix);
18793+ strcat(name, name_suffix); 18404+ strcat(name, name_suffix);
18794+ if (!drm_output_rename(output, name)) { 18405+ if (!drm_output_rename(output, name)) {
@@ -18815,7 +18426,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_sdvo.c
18815+ 18426+
18816+ /* Set the input timing to the screen. Assume always input 0. */ 18427+ /* Set the input timing to the screen. Assume always input 0. */
18817+ intel_sdvo_set_target_input(output, true, false); 18428+ intel_sdvo_set_target_input(output, true, false);
18818+ 18429+
18819+ intel_sdvo_get_input_pixel_clock_range(output, 18430+ intel_sdvo_get_input_pixel_clock_range(output,
18820+ &sdvo_priv->pixel_clock_min, 18431+ &sdvo_priv->pixel_clock_min,
18821+ &sdvo_priv->pixel_clock_max); 18432+ &sdvo_priv->pixel_clock_max);
@@ -18833,17 +18444,17 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_sdvo.c
18833+ (sdvo_priv->caps.sdvo_inputs_mask & 0x1) ? 'Y' : 'N', 18444+ (sdvo_priv->caps.sdvo_inputs_mask & 0x1) ? 'Y' : 'N',
18834+ (sdvo_priv->caps.sdvo_inputs_mask & 0x2) ? 'Y' : 'N', 18445+ (sdvo_priv->caps.sdvo_inputs_mask & 0x2) ? 'Y' : 'N',
18835+ /* check currently supported outputs */ 18446+ /* check currently supported outputs */
18836+ sdvo_priv->caps.output_flags & 18447+ sdvo_priv->caps.output_flags &
18837+ (SDVO_OUTPUT_TMDS0 | SDVO_OUTPUT_RGB0) ? 'Y' : 'N', 18448+ (SDVO_OUTPUT_TMDS0 | SDVO_OUTPUT_RGB0) ? 'Y' : 'N',
18838+ sdvo_priv->caps.output_flags & 18449+ sdvo_priv->caps.output_flags &
18839+ (SDVO_OUTPUT_TMDS1 | SDVO_OUTPUT_RGB1) ? 'Y' : 'N'); 18450+ (SDVO_OUTPUT_TMDS1 | SDVO_OUTPUT_RGB1) ? 'Y' : 'N');
18840+ 18451+
18841+ intel_output->ddc_bus = i2cbus; 18452+ intel_output->ddc_bus = i2cbus;
18842+} 18453+}
18843Index: linux-2.6.27/drivers/gpu/drm/psb/intel_sdvo_regs.h 18454Index: linux-2.6.27/drivers/gpu/drm/psb/intel_sdvo_regs.h
18844=================================================================== 18455===================================================================
18845--- /dev/null 1970-01-01 00:00:00.000000000 +0000 18456--- /dev/null 1970-01-01 00:00:00.000000000 +0000
18846+++ linux-2.6.27/drivers/gpu/drm/psb/intel_sdvo_regs.h 2009-01-14 11:58:01.000000000 +0000 18457+++ linux-2.6.27/drivers/gpu/drm/psb/intel_sdvo_regs.h 2009-02-05 13:29:33.000000000 +0000
18847@@ -0,0 +1,580 @@ 18458@@ -0,0 +1,580 @@
18848+/* 18459+/*
18849+ * Copyright ?2006-2007 Intel Corporation 18460+ * Copyright ?2006-2007 Intel Corporation
@@ -19428,7 +19039,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/intel_sdvo_regs.h
19428Index: linux-2.6.27/drivers/gpu/drm/psb/psb_buffer.c 19039Index: linux-2.6.27/drivers/gpu/drm/psb/psb_buffer.c
19429=================================================================== 19040===================================================================
19430--- /dev/null 1970-01-01 00:00:00.000000000 +0000 19041--- /dev/null 1970-01-01 00:00:00.000000000 +0000
19431+++ linux-2.6.27/drivers/gpu/drm/psb/psb_buffer.c 2009-01-14 11:58:01.000000000 +0000 19042+++ linux-2.6.27/drivers/gpu/drm/psb/psb_buffer.c 2009-02-05 13:29:33.000000000 +0000
19432@@ -0,0 +1,437 @@ 19043@@ -0,0 +1,437 @@
19433+/************************************************************************** 19044+/**************************************************************************
19434+ * Copyright (c) 2007, Intel Corporation. 19045+ * Copyright (c) 2007, Intel Corporation.
@@ -19870,7 +19481,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/psb_buffer.c
19870Index: linux-2.6.27/drivers/gpu/drm/psb/psb_drm.h 19481Index: linux-2.6.27/drivers/gpu/drm/psb/psb_drm.h
19871=================================================================== 19482===================================================================
19872--- /dev/null 1970-01-01 00:00:00.000000000 +0000 19483--- /dev/null 1970-01-01 00:00:00.000000000 +0000
19873+++ linux-2.6.27/drivers/gpu/drm/psb/psb_drm.h 2009-01-14 11:58:01.000000000 +0000 19484+++ linux-2.6.27/drivers/gpu/drm/psb/psb_drm.h 2009-02-05 13:29:33.000000000 +0000
19874@@ -0,0 +1,370 @@ 19485@@ -0,0 +1,370 @@
19875+/************************************************************************** 19486+/**************************************************************************
19876+ * Copyright (c) 2007, Intel Corporation. 19487+ * Copyright (c) 2007, Intel Corporation.
@@ -20245,7 +19856,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/psb_drm.h
20245Index: linux-2.6.27/drivers/gpu/drm/psb/psb_drv.c 19856Index: linux-2.6.27/drivers/gpu/drm/psb/psb_drv.c
20246=================================================================== 19857===================================================================
20247--- /dev/null 1970-01-01 00:00:00.000000000 +0000 19858--- /dev/null 1970-01-01 00:00:00.000000000 +0000
20248+++ linux-2.6.27/drivers/gpu/drm/psb/psb_drv.c 2009-01-14 11:58:01.000000000 +0000 19859+++ linux-2.6.27/drivers/gpu/drm/psb/psb_drv.c 2009-02-05 13:29:33.000000000 +0000
20249@@ -0,0 +1,1006 @@ 19860@@ -0,0 +1,1006 @@
20250+/************************************************************************** 19861+/**************************************************************************
20251+ * Copyright (c) 2007, Intel Corporation. 19862+ * Copyright (c) 2007, Intel Corporation.
@@ -20712,7 +20323,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/psb_drv.c
20712+ mutex_lock(&dev->mode_config.mutex); 20323+ mutex_lock(&dev->mode_config.mutex);
20713+ 20324+
20714+ drm_crtc_probe_output_modes(dev, 2048, 2048); 20325+ drm_crtc_probe_output_modes(dev, 2048, 2048);
20715+ 20326+
20716+ /* strncpy(drm_init_mode, psb_init_mode, strlen(psb_init_mode)); */ 20327+ /* strncpy(drm_init_mode, psb_init_mode, strlen(psb_init_mode)); */
20717+ drm_init_xres = psb_init_xres; 20328+ drm_init_xres = psb_init_xres;
20718+ drm_init_yres = psb_init_yres; 20329+ drm_init_yres = psb_init_yres;
@@ -20800,7 +20411,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/psb_drv.c
20800+ psb_scheduler_init(dev, &dev_priv->scheduler); 20411+ psb_scheduler_init(dev, &dev_priv->scheduler);
20801+ 20412+
20802+ resource_start = pci_resource_start(dev->pdev, PSB_MMIO_RESOURCE); 20413+ resource_start = pci_resource_start(dev->pdev, PSB_MMIO_RESOURCE);
20803+ 20414+
20804+ dev_priv->msvdx_reg = 20415+ dev_priv->msvdx_reg =
20805+ ioremap(resource_start + PSB_MSVDX_OFFSET, PSB_MSVDX_SIZE); 20416+ ioremap(resource_start + PSB_MSVDX_OFFSET, PSB_MSVDX_SIZE);
20806+ if (!dev_priv->msvdx_reg) 20417+ if (!dev_priv->msvdx_reg)
@@ -20955,7 +20566,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/psb_drv.c
20955+ } while (ret == -EINTR); 20566+ } while (ret == -EINTR);
20956+ 20567+
20957+ } 20568+ }
20958+ 20569+
20959+ /* Issue software reset */ 20570+ /* Issue software reset */
20960+ PSB_WMSVDX32 (msvdx_sw_reset_all, MSVDX_CONTROL); 20571+ PSB_WMSVDX32 (msvdx_sw_reset_all, MSVDX_CONTROL);
20961+ 20572+
@@ -21025,7 +20636,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/psb_drv.c
21025+#ifdef USE_PAT_WC 20636+#ifdef USE_PAT_WC
21026+#warning Init pat 20637+#warning Init pat
21027+ /* for single CPU's we do it here, then for more than one CPU we 20638+ /* for single CPU's we do it here, then for more than one CPU we
21028+ * use the CPU notifier to reinit PAT on those CPU's. 20639+ * use the CPU notifier to reinit PAT on those CPU's.
21029+ */ 20640+ */
21030+ drm_init_pat(); 20641+ drm_init_pat();
21031+#endif 20642+#endif
@@ -21102,7 +20713,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/psb_drv.c
21102+ if (drm_psb_no_fb == 0) 20713+ if (drm_psb_no_fb == 0)
21103+ psbfb_resume(dev); 20714+ psbfb_resume(dev);
21104+#ifdef WA_NO_FB_GARBAGE_DISPLAY 20715+#ifdef WA_NO_FB_GARBAGE_DISPLAY
21105+ else { 20716+ else {
21106+ if(num_registered_fb) 20717+ if(num_registered_fb)
21107+ { 20718+ {
21108+ struct fb_info *fb_info=registered_fb[0]; 20719+ struct fb_info *fb_info=registered_fb[0];
@@ -21116,7 +20727,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/psb_drv.c
21116+ printk("set the fb_set_suspend resume end\n"); 20727+ printk("set the fb_set_suspend resume end\n");
21117+ } 20728+ }
21118+ } 20729+ }
21119+ } 20730+ }
21120+#endif 20731+#endif
21121+ 20732+
21122+ return 0; 20733+ return 0;
@@ -21256,7 +20867,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/psb_drv.c
21256Index: linux-2.6.27/drivers/gpu/drm/psb/psb_drv.h 20867Index: linux-2.6.27/drivers/gpu/drm/psb/psb_drv.h
21257=================================================================== 20868===================================================================
21258--- /dev/null 1970-01-01 00:00:00.000000000 +0000 20869--- /dev/null 1970-01-01 00:00:00.000000000 +0000
21259+++ linux-2.6.27/drivers/gpu/drm/psb/psb_drv.h 2009-01-14 11:58:01.000000000 +0000 20870+++ linux-2.6.27/drivers/gpu/drm/psb/psb_drv.h 2009-02-05 13:29:33.000000000 +0000
21260@@ -0,0 +1,775 @@ 20871@@ -0,0 +1,775 @@
21261+/************************************************************************** 20872+/**************************************************************************
21262+ * Copyright (c) 2007, Intel Corporation. 20873+ * Copyright (c) 2007, Intel Corporation.
@@ -21709,7 +21320,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/psb_drv.h
21709+ struct mutex msvdx_mutex; 21320+ struct mutex msvdx_mutex;
21710+ struct list_head msvdx_queue; 21321+ struct list_head msvdx_queue;
21711+ int msvdx_busy; 21322+ int msvdx_busy;
21712+ 21323+
21713+}; 21324+};
21714+ 21325+
21715+struct psb_mmu_driver; 21326+struct psb_mmu_driver;
@@ -22036,7 +21647,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/psb_drv.h
22036Index: linux-2.6.27/drivers/gpu/drm/psb/psb_fb.c 21647Index: linux-2.6.27/drivers/gpu/drm/psb/psb_fb.c
22037=================================================================== 21648===================================================================
22038--- /dev/null 1970-01-01 00:00:00.000000000 +0000 21649--- /dev/null 1970-01-01 00:00:00.000000000 +0000
22039+++ linux-2.6.27/drivers/gpu/drm/psb/psb_fb.c 2009-01-14 12:03:18.000000000 +0000 21650+++ linux-2.6.27/drivers/gpu/drm/psb/psb_fb.c 2009-02-05 13:29:33.000000000 +0000
22040@@ -0,0 +1,1330 @@ 21651@@ -0,0 +1,1330 @@
22041+/************************************************************************** 21652+/**************************************************************************
22042+ * Copyright (c) 2007, Intel Corporation. 21653+ * Copyright (c) 2007, Intel Corporation.
@@ -23371,7 +22982,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/psb_fb.c
23371Index: linux-2.6.27/drivers/gpu/drm/psb/psb_fence.c 22982Index: linux-2.6.27/drivers/gpu/drm/psb/psb_fence.c
23372=================================================================== 22983===================================================================
23373--- /dev/null 1970-01-01 00:00:00.000000000 +0000 22984--- /dev/null 1970-01-01 00:00:00.000000000 +0000
23374+++ linux-2.6.27/drivers/gpu/drm/psb/psb_fence.c 2009-01-14 11:58:01.000000000 +0000 22985+++ linux-2.6.27/drivers/gpu/drm/psb/psb_fence.c 2009-02-05 13:29:33.000000000 +0000
23375@@ -0,0 +1,285 @@ 22986@@ -0,0 +1,285 @@
23376+/************************************************************************** 22987+/**************************************************************************
23377+ * Copyright (c) 2007, Intel Corporation. 22988+ * Copyright (c) 2007, Intel Corporation.
@@ -23661,7 +23272,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/psb_fence.c
23661Index: linux-2.6.27/drivers/gpu/drm/psb/psb_gtt.c 23272Index: linux-2.6.27/drivers/gpu/drm/psb/psb_gtt.c
23662=================================================================== 23273===================================================================
23663--- /dev/null 1970-01-01 00:00:00.000000000 +0000 23274--- /dev/null 1970-01-01 00:00:00.000000000 +0000
23664+++ linux-2.6.27/drivers/gpu/drm/psb/psb_gtt.c 2009-01-14 11:58:01.000000000 +0000 23275+++ linux-2.6.27/drivers/gpu/drm/psb/psb_gtt.c 2009-02-05 13:29:33.000000000 +0000
23665@@ -0,0 +1,233 @@ 23276@@ -0,0 +1,233 @@
23666+/************************************************************************** 23277+/**************************************************************************
23667+ * Copyright (c) 2007, Intel Corporation. 23278+ * Copyright (c) 2007, Intel Corporation.
@@ -23899,7 +23510,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/psb_gtt.c
23899Index: linux-2.6.27/drivers/gpu/drm/psb/psb_i2c.c 23510Index: linux-2.6.27/drivers/gpu/drm/psb/psb_i2c.c
23900=================================================================== 23511===================================================================
23901--- /dev/null 1970-01-01 00:00:00.000000000 +0000 23512--- /dev/null 1970-01-01 00:00:00.000000000 +0000
23902+++ linux-2.6.27/drivers/gpu/drm/psb/psb_i2c.c 2009-01-14 11:58:01.000000000 +0000 23513+++ linux-2.6.27/drivers/gpu/drm/psb/psb_i2c.c 2009-02-05 13:29:33.000000000 +0000
23903@@ -0,0 +1,179 @@ 23514@@ -0,0 +1,179 @@
23904+/* 23515+/*
23905+ * Copyright © 2006-2007 Intel Corporation 23516+ * Copyright © 2006-2007 Intel Corporation
@@ -24083,7 +23694,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/psb_i2c.c
24083Index: linux-2.6.27/drivers/gpu/drm/psb/psb_irq.c 23694Index: linux-2.6.27/drivers/gpu/drm/psb/psb_irq.c
24084=================================================================== 23695===================================================================
24085--- /dev/null 1970-01-01 00:00:00.000000000 +0000 23696--- /dev/null 1970-01-01 00:00:00.000000000 +0000
24086+++ linux-2.6.27/drivers/gpu/drm/psb/psb_irq.c 2009-01-14 11:58:01.000000000 +0000 23697+++ linux-2.6.27/drivers/gpu/drm/psb/psb_irq.c 2009-02-05 13:29:33.000000000 +0000
24087@@ -0,0 +1,382 @@ 23698@@ -0,0 +1,382 @@
24088+/************************************************************************** 23699+/**************************************************************************
24089+ * Copyright (c) 2007, Intel Corporation. 23700+ * Copyright (c) 2007, Intel Corporation.
@@ -24470,7 +24081,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/psb_irq.c
24470Index: linux-2.6.27/drivers/gpu/drm/psb/psb_mmu.c 24081Index: linux-2.6.27/drivers/gpu/drm/psb/psb_mmu.c
24471=================================================================== 24082===================================================================
24472--- /dev/null 1970-01-01 00:00:00.000000000 +0000 24083--- /dev/null 1970-01-01 00:00:00.000000000 +0000
24473+++ linux-2.6.27/drivers/gpu/drm/psb/psb_mmu.c 2009-01-14 11:58:01.000000000 +0000 24084+++ linux-2.6.27/drivers/gpu/drm/psb/psb_mmu.c 2009-02-05 13:29:33.000000000 +0000
24474@@ -0,0 +1,1037 @@ 24085@@ -0,0 +1,1037 @@
24475+/************************************************************************** 24086+/**************************************************************************
24476+ * Copyright (c) 2007, Intel Corporation. 24087+ * Copyright (c) 2007, Intel Corporation.
@@ -25512,7 +25123,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/psb_mmu.c
25512Index: linux-2.6.27/drivers/gpu/drm/psb/psb_msvdx.c 25123Index: linux-2.6.27/drivers/gpu/drm/psb/psb_msvdx.c
25513=================================================================== 25124===================================================================
25514--- /dev/null 1970-01-01 00:00:00.000000000 +0000 25125--- /dev/null 1970-01-01 00:00:00.000000000 +0000
25515+++ linux-2.6.27/drivers/gpu/drm/psb/psb_msvdx.c 2009-01-14 11:58:01.000000000 +0000 25126+++ linux-2.6.27/drivers/gpu/drm/psb/psb_msvdx.c 2009-02-05 13:29:33.000000000 +0000
25516@@ -0,0 +1,676 @@ 25127@@ -0,0 +1,676 @@
25517+/** 25128+/**
25518+ * file psb_msvdx.c 25129+ * file psb_msvdx.c
@@ -25652,7 +25263,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/psb_msvdx.c
25652+ { 25263+ {
25653+ mmu_ptd |= 1; 25264+ mmu_ptd |= 1;
25654+ PSB_DEBUG_GENERAL ("MSVDX: Setting MMU invalidate flag\n"); 25265+ PSB_DEBUG_GENERAL ("MSVDX: Setting MMU invalidate flag\n");
25655+ } 25266+ }
25656+ /* PTD */ 25267+ /* PTD */
25657+ MEMIO_WRITE_FIELD (cmd, FW_VA_RENDER_MMUPTD, mmu_ptd); 25268+ MEMIO_WRITE_FIELD (cmd, FW_VA_RENDER_MMUPTD, mmu_ptd);
25658+ break; 25269+ break;
@@ -26160,8 +25771,8 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/psb_msvdx.c
26160+ } 25771+ }
26161+ if (dev_priv->msvdx_start_idle) 25772+ if (dev_priv->msvdx_start_idle)
26162+ dev_priv->msvdx_start_idle = 0; 25773+ dev_priv->msvdx_start_idle = 0;
26163+ } 25774+ }
26164+ else 25775+ else
26165+ { 25776+ {
26166+ if (dev_priv->msvdx_needs_reset == 0) 25777+ if (dev_priv->msvdx_needs_reset == 0)
26167+ { 25778+ {
@@ -26193,7 +25804,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/psb_msvdx.c
26193Index: linux-2.6.27/drivers/gpu/drm/psb/psb_msvdx.h 25804Index: linux-2.6.27/drivers/gpu/drm/psb/psb_msvdx.h
26194=================================================================== 25805===================================================================
26195--- /dev/null 1970-01-01 00:00:00.000000000 +0000 25806--- /dev/null 1970-01-01 00:00:00.000000000 +0000
26196+++ linux-2.6.27/drivers/gpu/drm/psb/psb_msvdx.h 2009-01-14 11:58:01.000000000 +0000 25807+++ linux-2.6.27/drivers/gpu/drm/psb/psb_msvdx.h 2009-02-05 13:29:33.000000000 +0000
26197@@ -0,0 +1,564 @@ 25808@@ -0,0 +1,564 @@
26198+/************************************************************************** 25809+/**************************************************************************
26199+ * 25810+ *
@@ -26762,7 +26373,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/psb_msvdx.h
26762Index: linux-2.6.27/drivers/gpu/drm/psb/psb_msvdxinit.c 26373Index: linux-2.6.27/drivers/gpu/drm/psb/psb_msvdxinit.c
26763=================================================================== 26374===================================================================
26764--- /dev/null 1970-01-01 00:00:00.000000000 +0000 26375--- /dev/null 1970-01-01 00:00:00.000000000 +0000
26765+++ linux-2.6.27/drivers/gpu/drm/psb/psb_msvdxinit.c 2009-01-14 11:58:01.000000000 +0000 26376+++ linux-2.6.27/drivers/gpu/drm/psb/psb_msvdxinit.c 2009-02-05 13:29:33.000000000 +0000
26766@@ -0,0 +1,625 @@ 26377@@ -0,0 +1,625 @@
26767+/** 26378+/**
26768+ * file psb_msvdxinit.c 26379+ * file psb_msvdxinit.c
@@ -27066,7 +26677,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/psb_msvdxinit.c
27066+ PSB_DEBUG_GENERAL("MSVDX: Detected Poulsbo D1 or later revision.\n"); 26677+ PSB_DEBUG_GENERAL("MSVDX: Detected Poulsbo D1 or later revision.\n");
27067+ PSB_WMSVDX32 (MSVDX_DEVICE_NODE_FLAGS_DEFAULT_D1, MSVDX_COMMS_OFFSET_FLAGS); 26678+ PSB_WMSVDX32 (MSVDX_DEVICE_NODE_FLAGS_DEFAULT_D1, MSVDX_COMMS_OFFSET_FLAGS);
27068+ } 26679+ }
27069+ else 26680+ else
27070+ { 26681+ {
27071+ PSB_DEBUG_GENERAL("MSVDX: Detected Poulsbo D0 or earlier revision.\n"); 26682+ PSB_DEBUG_GENERAL("MSVDX: Detected Poulsbo D0 or earlier revision.\n");
27072+ PSB_WMSVDX32 (MSVDX_DEVICE_NODE_FLAGS_DEFAULT_D0, MSVDX_COMMS_OFFSET_FLAGS); 26683+ PSB_WMSVDX32 (MSVDX_DEVICE_NODE_FLAGS_DEFAULT_D0, MSVDX_COMMS_OFFSET_FLAGS);
@@ -27212,7 +26823,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/psb_msvdxinit.c
27212+ /* Clear any pending interrupt flags */ 26823+ /* Clear any pending interrupt flags */
27213+ PSB_WMSVDX32 (0xFFFFFFFF, MSVDX_INTERRUPT_CLEAR); 26824+ PSB_WMSVDX32 (0xFFFFFFFF, MSVDX_INTERRUPT_CLEAR);
27214+ } 26825+ }
27215+ 26826+
27216+ mutex_destroy (&dev_priv->msvdx_mutex); 26827+ mutex_destroy (&dev_priv->msvdx_mutex);
27217+ 26828+
27218+ return ret; 26829+ return ret;
@@ -27381,7 +26992,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/psb_msvdxinit.c
27381+ struct pci_dev * pci_root = pci_get_bus_and_slot(0, 0); 26992+ struct pci_dev * pci_root = pci_get_bus_and_slot(0, 0);
27382+ 26993+
27383+ hw_info->rev_id = dev_priv->psb_rev_id; 26994+ hw_info->rev_id = dev_priv->psb_rev_id;
27384+ 26995+
27385+ /*read the fuse info to determine the caps*/ 26996+ /*read the fuse info to determine the caps*/
27386+ pci_write_config_dword(pci_root, 0xD0, PCI_PORT5_REG80_FFUSE); 26997+ pci_write_config_dword(pci_root, 0xD0, PCI_PORT5_REG80_FFUSE);
27387+ pci_read_config_dword(pci_root, 0xD4, &hw_info->caps); 26998+ pci_read_config_dword(pci_root, 0xD4, &hw_info->caps);
@@ -27392,7 +27003,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/psb_msvdxinit.c
27392Index: linux-2.6.27/drivers/gpu/drm/psb/psb_reg.h 27003Index: linux-2.6.27/drivers/gpu/drm/psb/psb_reg.h
27393=================================================================== 27004===================================================================
27394--- /dev/null 1970-01-01 00:00:00.000000000 +0000 27005--- /dev/null 1970-01-01 00:00:00.000000000 +0000
27395+++ linux-2.6.27/drivers/gpu/drm/psb/psb_reg.h 2009-01-14 11:58:01.000000000 +0000 27006+++ linux-2.6.27/drivers/gpu/drm/psb/psb_reg.h 2009-02-05 13:29:33.000000000 +0000
27396@@ -0,0 +1,562 @@ 27007@@ -0,0 +1,562 @@
27397+/************************************************************************** 27008+/**************************************************************************
27398+ * 27009+ *
@@ -27410,7 +27021,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/psb_reg.h
27410+ * more details. 27021+ * more details.
27411+ * 27022+ *
27412+ * You should have received a copy of the GNU General Public License along with 27023+ * You should have received a copy of the GNU General Public License along with
27413+ * this program; if not, write to the Free Software Foundation, Inc., 27024+ * this program; if not, write to the Free Software Foundation, Inc.,
27414+ * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. 27025+ * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
27415+ * 27026+ *
27416+ * Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to 27027+ * Intel funded Tungsten Graphics (http://www.tungstengraphics.com) to
@@ -27959,7 +27570,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/psb_reg.h
27959Index: linux-2.6.27/drivers/gpu/drm/psb/psb_regman.c 27570Index: linux-2.6.27/drivers/gpu/drm/psb/psb_regman.c
27960=================================================================== 27571===================================================================
27961--- /dev/null 1970-01-01 00:00:00.000000000 +0000 27572--- /dev/null 1970-01-01 00:00:00.000000000 +0000
27962+++ linux-2.6.27/drivers/gpu/drm/psb/psb_regman.c 2009-01-14 11:58:01.000000000 +0000 27573+++ linux-2.6.27/drivers/gpu/drm/psb/psb_regman.c 2009-02-05 13:29:33.000000000 +0000
27963@@ -0,0 +1,175 @@ 27574@@ -0,0 +1,175 @@
27964+/************************************************************************** 27575+/**************************************************************************
27965+ * Copyright (c) 2007, Intel Corporation. 27576+ * Copyright (c) 2007, Intel Corporation.
@@ -28139,7 +27750,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/psb_regman.c
28139Index: linux-2.6.27/drivers/gpu/drm/psb/psb_reset.c 27750Index: linux-2.6.27/drivers/gpu/drm/psb/psb_reset.c
28140=================================================================== 27751===================================================================
28141--- /dev/null 1970-01-01 00:00:00.000000000 +0000 27752--- /dev/null 1970-01-01 00:00:00.000000000 +0000
28142+++ linux-2.6.27/drivers/gpu/drm/psb/psb_reset.c 2009-01-14 11:58:01.000000000 +0000 27753+++ linux-2.6.27/drivers/gpu/drm/psb/psb_reset.c 2009-02-05 13:29:33.000000000 +0000
28143@@ -0,0 +1,374 @@ 27754@@ -0,0 +1,374 @@
28144+/************************************************************************** 27755+/**************************************************************************
28145+ * Copyright (c) 2007, Intel Corporation. 27756+ * Copyright (c) 2007, Intel Corporation.
@@ -28518,7 +28129,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/psb_reset.c
28518Index: linux-2.6.27/drivers/gpu/drm/psb/psb_scene.c 28129Index: linux-2.6.27/drivers/gpu/drm/psb/psb_scene.c
28519=================================================================== 28130===================================================================
28520--- /dev/null 1970-01-01 00:00:00.000000000 +0000 28131--- /dev/null 1970-01-01 00:00:00.000000000 +0000
28521+++ linux-2.6.27/drivers/gpu/drm/psb/psb_scene.c 2009-01-14 11:58:01.000000000 +0000 28132+++ linux-2.6.27/drivers/gpu/drm/psb/psb_scene.c 2009-02-05 13:29:33.000000000 +0000
28522@@ -0,0 +1,531 @@ 28133@@ -0,0 +1,531 @@
28523+/************************************************************************** 28134+/**************************************************************************
28524+ * Copyright (c) 2007, Intel Corporation. 28135+ * Copyright (c) 2007, Intel Corporation.
@@ -29054,7 +28665,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/psb_scene.c
29054Index: linux-2.6.27/drivers/gpu/drm/psb/psb_scene.h 28665Index: linux-2.6.27/drivers/gpu/drm/psb/psb_scene.h
29055=================================================================== 28666===================================================================
29056--- /dev/null 1970-01-01 00:00:00.000000000 +0000 28667--- /dev/null 1970-01-01 00:00:00.000000000 +0000
29057+++ linux-2.6.27/drivers/gpu/drm/psb/psb_scene.h 2009-01-14 11:58:01.000000000 +0000 28668+++ linux-2.6.27/drivers/gpu/drm/psb/psb_scene.h 2009-02-05 13:29:33.000000000 +0000
29058@@ -0,0 +1,112 @@ 28669@@ -0,0 +1,112 @@
29059+/************************************************************************** 28670+/**************************************************************************
29060+ * Copyright (c) 2007, Intel Corporation. 28671+ * Copyright (c) 2007, Intel Corporation.
@@ -29171,7 +28782,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/psb_scene.h
29171Index: linux-2.6.27/drivers/gpu/drm/psb/psb_schedule.c 28782Index: linux-2.6.27/drivers/gpu/drm/psb/psb_schedule.c
29172=================================================================== 28783===================================================================
29173--- /dev/null 1970-01-01 00:00:00.000000000 +0000 28784--- /dev/null 1970-01-01 00:00:00.000000000 +0000
29174+++ linux-2.6.27/drivers/gpu/drm/psb/psb_schedule.c 2009-01-14 11:58:01.000000000 +0000 28785+++ linux-2.6.27/drivers/gpu/drm/psb/psb_schedule.c 2009-02-05 13:29:33.000000000 +0000
29175@@ -0,0 +1,1445 @@ 28786@@ -0,0 +1,1445 @@
29176+/************************************************************************** 28787+/**************************************************************************
29177+ * Copyright (c) 2007, Intel Corporation. 28788+ * Copyright (c) 2007, Intel Corporation.
@@ -30621,7 +30232,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/psb_schedule.c
30621Index: linux-2.6.27/drivers/gpu/drm/psb/psb_schedule.h 30232Index: linux-2.6.27/drivers/gpu/drm/psb/psb_schedule.h
30622=================================================================== 30233===================================================================
30623--- /dev/null 1970-01-01 00:00:00.000000000 +0000 30234--- /dev/null 1970-01-01 00:00:00.000000000 +0000
30624+++ linux-2.6.27/drivers/gpu/drm/psb/psb_schedule.h 2009-01-14 11:58:01.000000000 +0000 30235+++ linux-2.6.27/drivers/gpu/drm/psb/psb_schedule.h 2009-02-05 13:29:33.000000000 +0000
30625@@ -0,0 +1,170 @@ 30236@@ -0,0 +1,170 @@
30626+/************************************************************************** 30237+/**************************************************************************
30627+ * Copyright (c) 2007, Intel Corporation. 30238+ * Copyright (c) 2007, Intel Corporation.
@@ -30796,7 +30407,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/psb_schedule.h
30796Index: linux-2.6.27/drivers/gpu/drm/psb/psb_setup.c 30407Index: linux-2.6.27/drivers/gpu/drm/psb/psb_setup.c
30797=================================================================== 30408===================================================================
30798--- /dev/null 1970-01-01 00:00:00.000000000 +0000 30409--- /dev/null 1970-01-01 00:00:00.000000000 +0000
30799+++ linux-2.6.27/drivers/gpu/drm/psb/psb_setup.c 2009-01-14 11:58:01.000000000 +0000 30410+++ linux-2.6.27/drivers/gpu/drm/psb/psb_setup.c 2009-02-05 13:29:33.000000000 +0000
30800@@ -0,0 +1,17 @@ 30411@@ -0,0 +1,17 @@
30801+#include "drmP.h" 30412+#include "drmP.h"
30802+#include "drm.h" 30413+#include "drm.h"
@@ -30818,7 +30429,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/psb_setup.c
30818Index: linux-2.6.27/drivers/gpu/drm/psb/psb_sgx.c 30429Index: linux-2.6.27/drivers/gpu/drm/psb/psb_sgx.c
30819=================================================================== 30430===================================================================
30820--- /dev/null 1970-01-01 00:00:00.000000000 +0000 30431--- /dev/null 1970-01-01 00:00:00.000000000 +0000
30821+++ linux-2.6.27/drivers/gpu/drm/psb/psb_sgx.c 2009-01-14 11:58:01.000000000 +0000 30432+++ linux-2.6.27/drivers/gpu/drm/psb/psb_sgx.c 2009-02-05 13:29:33.000000000 +0000
30822@@ -0,0 +1,1422 @@ 30433@@ -0,0 +1,1422 @@
30823+/************************************************************************** 30434+/**************************************************************************
30824+ * Copyright (c) 2007, Intel Corporation. 30435+ * Copyright (c) 2007, Intel Corporation.
@@ -32245,7 +31856,7 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/psb_sgx.c
32245Index: linux-2.6.27/drivers/gpu/drm/psb/psb_xhw.c 31856Index: linux-2.6.27/drivers/gpu/drm/psb/psb_xhw.c
32246=================================================================== 31857===================================================================
32247--- /dev/null 1970-01-01 00:00:00.000000000 +0000 31858--- /dev/null 1970-01-01 00:00:00.000000000 +0000
32248+++ linux-2.6.27/drivers/gpu/drm/psb/psb_xhw.c 2009-01-14 11:58:01.000000000 +0000 31859+++ linux-2.6.27/drivers/gpu/drm/psb/psb_xhw.c 2009-02-05 13:29:33.000000000 +0000
32249@@ -0,0 +1,614 @@ 31860@@ -0,0 +1,614 @@
32250+/************************************************************************** 31861+/**************************************************************************
32251+ * Copyright (c) 2007, Intel Corporation. 31862+ * Copyright (c) 2007, Intel Corporation.
@@ -32863,8 +32474,8 @@ Index: linux-2.6.27/drivers/gpu/drm/psb/psb_xhw.c
32863+} 32474+}
32864Index: linux-2.6.27/drivers/gpu/drm/Kconfig 32475Index: linux-2.6.27/drivers/gpu/drm/Kconfig
32865=================================================================== 32476===================================================================
32866--- linux-2.6.27.orig/drivers/gpu/drm/Kconfig 2009-01-14 11:54:35.000000000 +0000 32477--- linux-2.6.27.orig/drivers/gpu/drm/Kconfig 2008-10-09 23:13:53.000000000 +0100
32867+++ linux-2.6.27/drivers/gpu/drm/Kconfig 2009-01-14 11:58:01.000000000 +0000 32478+++ linux-2.6.27/drivers/gpu/drm/Kconfig 2009-02-05 13:29:33.000000000 +0000
32868@@ -105,3 +105,9 @@ 32479@@ -105,3 +105,9 @@
32869 help 32480 help
32870 Choose this option if you have a Savage3D/4/SuperSavage/Pro/Twister 32481 Choose this option if you have a Savage3D/4/SuperSavage/Pro/Twister
@@ -32878,7 +32489,7 @@ Index: linux-2.6.27/drivers/gpu/drm/Kconfig
32878Index: linux-2.6.27/include/drm/drm_crtc.h 32489Index: linux-2.6.27/include/drm/drm_crtc.h
32879=================================================================== 32490===================================================================
32880--- /dev/null 1970-01-01 00:00:00.000000000 +0000 32491--- /dev/null 1970-01-01 00:00:00.000000000 +0000
32881+++ linux-2.6.27/include/drm/drm_crtc.h 2009-01-14 12:01:13.000000000 +0000 32492+++ linux-2.6.27/include/drm/drm_crtc.h 2009-02-05 13:29:33.000000000 +0000
32882@@ -0,0 +1,592 @@ 32493@@ -0,0 +1,592 @@
32883+/* 32494+/*
32884+ * Copyright © 2006 Keith Packard 32495+ * Copyright © 2006 Keith Packard
@@ -33321,7 +32932,7 @@ Index: linux-2.6.27/include/drm/drm_crtc.h
33321+ 32932+
33322+ /* these are modes added by probing with DDC or the BIOS */ 32933+ /* these are modes added by probing with DDC or the BIOS */
33323+ struct list_head probed_modes; 32934+ struct list_head probed_modes;
33324+ 32935+
33325+ /* xf86MonPtr MonInfo; */ 32936+ /* xf86MonPtr MonInfo; */
33326+ enum subpixel_order subpixel_order; 32937+ enum subpixel_order subpixel_order;
33327+ int mm_width, mm_height; 32938+ int mm_width, mm_height;
@@ -33440,7 +33051,7 @@ Index: linux-2.6.27/include/drm/drm_crtc.h
33440+extern struct drm_property *drm_property_create(struct drm_device *dev, int flags, 33051+extern struct drm_property *drm_property_create(struct drm_device *dev, int flags,
33441+ const char *name, int num_values); 33052+ const char *name, int num_values);
33442+extern void drm_property_destroy(struct drm_device *dev, struct drm_property *property); 33053+extern void drm_property_destroy(struct drm_device *dev, struct drm_property *property);
33443+extern int drm_property_add_enum(struct drm_property *property, int index, 33054+extern int drm_property_add_enum(struct drm_property *property, int index,
33444+ uint32_t value, const char *name); 33055+ uint32_t value, const char *name);
33445+ 33056+
33446+/* IOCTLs */ 33057+/* IOCTLs */
@@ -33475,7 +33086,7 @@ Index: linux-2.6.27/include/drm/drm_crtc.h
33475Index: linux-2.6.27/include/drm/drm_edid.h 33086Index: linux-2.6.27/include/drm/drm_edid.h
33476=================================================================== 33087===================================================================
33477--- /dev/null 1970-01-01 00:00:00.000000000 +0000 33088--- /dev/null 1970-01-01 00:00:00.000000000 +0000
33478+++ linux-2.6.27/include/drm/drm_edid.h 2009-01-14 11:58:01.000000000 +0000 33089+++ linux-2.6.27/include/drm/drm_edid.h 2009-02-05 13:29:33.000000000 +0000
33479@@ -0,0 +1,179 @@ 33090@@ -0,0 +1,179 @@
33480+#ifndef __DRM_EDID_H__ 33091+#ifndef __DRM_EDID_H__
33481+#define __DRM_EDID_H__ 33092+#define __DRM_EDID_H__
@@ -33659,7 +33270,7 @@ Index: linux-2.6.27/include/drm/drm_edid.h
33659Index: linux-2.6.27/include/drm/drm_objects.h 33270Index: linux-2.6.27/include/drm/drm_objects.h
33660=================================================================== 33271===================================================================
33661--- /dev/null 1970-01-01 00:00:00.000000000 +0000 33272--- /dev/null 1970-01-01 00:00:00.000000000 +0000
33662+++ linux-2.6.27/include/drm/drm_objects.h 2009-01-14 11:58:01.000000000 +0000 33273+++ linux-2.6.27/include/drm/drm_objects.h 2009-02-05 13:29:33.000000000 +0000
33663@@ -0,0 +1,717 @@ 33274@@ -0,0 +1,717 @@
33664+/************************************************************************** 33275+/**************************************************************************
33665+ * 33276+ *
@@ -33858,7 +33469,7 @@ Index: linux-2.6.27/include/drm/drm_objects.h
33858+ * 33469+ *
33859+ * poll() : Call drm_fence_handler with any new information. 33470+ * poll() : Call drm_fence_handler with any new information.
33860+ * 33471+ *
33861+ * needed_flush() : Given the current state of the fence->type flags and previusly 33472+ * needed_flush() : Given the current state of the fence->type flags and previusly
33862+ * executed or queued flushes, return the type_flags that need flushing. 33473+ * executed or queued flushes, return the type_flags that need flushing.
33863+ * 33474+ *
33864+ * wait(): Wait for the "mask" flags to signal on a given fence, performing 33475+ * wait(): Wait for the "mask" flags to signal on a given fence, performing
@@ -34201,7 +33812,7 @@ Index: linux-2.6.27/include/drm/drm_objects.h
34201+ int (*command_stream_barrier) (struct drm_buffer_object *bo, 33812+ int (*command_stream_barrier) (struct drm_buffer_object *bo,
34202+ uint32_t new_fence_class, 33813+ uint32_t new_fence_class,
34203+ uint32_t new_fence_type, 33814+ uint32_t new_fence_type,
34204+ int no_wait); 33815+ int no_wait);
34205+}; 33816+};
34206+ 33817+
34207+/* 33818+/*
diff --git a/meta-moblin/packages/linux/linux-moblin_2.6.27.bb b/meta-moblin/packages/linux/linux-moblin_2.6.27.bb
index 0033f651b3..82f7b435e6 100644
--- a/meta-moblin/packages/linux/linux-moblin_2.6.27.bb
+++ b/meta-moblin/packages/linux/linux-moblin_2.6.27.bb
@@ -1,6 +1,6 @@
1require linux-moblin.inc 1require linux-moblin.inc
2 2
3PR = "r7" 3PR = "r8"
4PE = "1" 4PE = "1"
5 5
6DEFAULT_PREFERENCE = "-1" 6DEFAULT_PREFERENCE = "-1"