aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-04-09 20:41:26 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-09 20:41:26 -0400
commit49b442caa4ed719aa7e2522cdd5c8abf8607b860 (patch)
treedcc105e45ae1b7669302731a9e4574fb853b4128
parente8f2b548de7ae65e17ee911e54712a3f26f69c60 (diff)
parent1812a3db0874be1d1524086da9e84397b800f546 (diff)
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Pull drm fixes from Dave Airlie: "Just a spare semicolon in nouveau that caused some issues, and an mgag200 fix" * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: drm/mgag200: Index 24 in extended CRTC registers is 24 in hex, not decimal. drm/nouveau: fix unconditional return waiting on memory
-rw-r--r--drivers/gpu/drm/mgag200/mgag200_mode.c13
-rw-r--r--drivers/gpu/drm/nouveau/nv50_display.c2
2 files changed, 4 insertions, 11 deletions
diff --git a/drivers/gpu/drm/mgag200/mgag200_mode.c b/drivers/gpu/drm/mgag200/mgag200_mode.c
index fe22bb780e1d..78d8e919509f 100644
--- a/drivers/gpu/drm/mgag200/mgag200_mode.c
+++ b/drivers/gpu/drm/mgag200/mgag200_mode.c
@@ -751,8 +751,6 @@ static int mga_crtc_mode_set(struct drm_crtc *crtc,
751 int i; 751 int i;
752 unsigned char misc = 0; 752 unsigned char misc = 0;
753 unsigned char ext_vga[6]; 753 unsigned char ext_vga[6];
754 unsigned char ext_vga_index24;
755 unsigned char dac_index90 = 0;
756 u8 bppshift; 754 u8 bppshift;
757 755
758 static unsigned char dacvalue[] = { 756 static unsigned char dacvalue[] = {
@@ -803,7 +801,6 @@ static int mga_crtc_mode_set(struct drm_crtc *crtc,
803 option2 = 0x0000b000; 801 option2 = 0x0000b000;
804 break; 802 break;
805 case G200_ER: 803 case G200_ER:
806 dac_index90 = 0;
807 break; 804 break;
808 } 805 }
809 806
@@ -852,10 +849,8 @@ static int mga_crtc_mode_set(struct drm_crtc *crtc,
852 WREG_DAC(i, dacvalue[i]); 849 WREG_DAC(i, dacvalue[i]);
853 } 850 }
854 851
855 if (mdev->type == G200_ER) { 852 if (mdev->type == G200_ER)
856 WREG_DAC(0x90, dac_index90); 853 WREG_DAC(0x90, 0);
857 }
858
859 854
860 if (option) 855 if (option)
861 pci_write_config_dword(dev->pdev, PCI_MGA_OPTION, option); 856 pci_write_config_dword(dev->pdev, PCI_MGA_OPTION, option);
@@ -952,8 +947,6 @@ static int mga_crtc_mode_set(struct drm_crtc *crtc,
952 if (mdev->type == G200_WB) 947 if (mdev->type == G200_WB)
953 ext_vga[1] |= 0x88; 948 ext_vga[1] |= 0x88;
954 949
955 ext_vga_index24 = 0x05;
956
957 /* Set pixel clocks */ 950 /* Set pixel clocks */
958 misc = 0x2d; 951 misc = 0x2d;
959 WREG8(MGA_MISC_OUT, misc); 952 WREG8(MGA_MISC_OUT, misc);
@@ -965,7 +958,7 @@ static int mga_crtc_mode_set(struct drm_crtc *crtc,
965 } 958 }
966 959
967 if (mdev->type == G200_ER) 960 if (mdev->type == G200_ER)
968 WREG_ECRT(24, ext_vga_index24); 961 WREG_ECRT(0x24, 0x5);
969 962
970 if (mdev->type == G200_EV) { 963 if (mdev->type == G200_EV) {
971 WREG_ECRT(6, 0); 964 WREG_ECRT(6, 0);
diff --git a/drivers/gpu/drm/nouveau/nv50_display.c b/drivers/gpu/drm/nouveau/nv50_display.c
index 7f0e6c3f37d1..1ddc03e51bf4 100644
--- a/drivers/gpu/drm/nouveau/nv50_display.c
+++ b/drivers/gpu/drm/nouveau/nv50_display.c
@@ -479,7 +479,7 @@ nv50_display_flip_wait(void *data)
479{ 479{
480 struct nv50_display_flip *flip = data; 480 struct nv50_display_flip *flip = data;
481 if (nouveau_bo_rd32(flip->disp->sync, flip->chan->addr / 4) == 481 if (nouveau_bo_rd32(flip->disp->sync, flip->chan->addr / 4) ==
482 flip->chan->data); 482 flip->chan->data)
483 return true; 483 return true;
484 usleep_range(1, 2); 484 usleep_range(1, 2);
485 return false; 485 return false;