diff options
author | Ilia Mirkin <imirkin@alum.mit.edu> | 2013-09-05 04:45:02 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2013-11-08 00:37:35 -0500 |
commit | 4a0ff75418851116d034fa4d91bef114f01a329d (patch) | |
tree | effba9ba7b4fc61467a4c8da18c0a5bd9c4b04f0 /drivers/gpu/drm/nouveau | |
parent | 73f4b1f8938174dcf1645563e541022837a6a7f4 (diff) |
drm/nv10: introduce a new NV_11 card type
NV11/17/1F/18 come after NV10/15/16/1A. In order to facilitate using
numerical comparisons, split up the two sets into different card types.
This change should be a no-op except that the relevant cards will see
NV11 printed instead of NV10 for the family.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau')
-rw-r--r-- | drivers/gpu/drm/nouveau/core/engine/device/base.c | 11 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/core/include/core/device.h | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/core/subdev/bios/pll.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/dispnv04/hw.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_abi16.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_bo.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_connector.c | 7 |
7 files changed, 19 insertions, 7 deletions
diff --git a/drivers/gpu/drm/nouveau/core/engine/device/base.c b/drivers/gpu/drm/nouveau/core/engine/device/base.c index 1407d80b910c..f8b4fbf55889 100644 --- a/drivers/gpu/drm/nouveau/core/engine/device/base.c +++ b/drivers/gpu/drm/nouveau/core/engine/device/base.c | |||
@@ -161,7 +161,13 @@ nouveau_devobj_ctor(struct nouveau_object *parent, | |||
161 | if ((boot0 & 0x0f000000) > 0) { | 161 | if ((boot0 & 0x0f000000) > 0) { |
162 | device->chipset = (boot0 & 0xff00000) >> 20; | 162 | device->chipset = (boot0 & 0xff00000) >> 20; |
163 | switch (device->chipset & 0xf0) { | 163 | switch (device->chipset & 0xf0) { |
164 | case 0x10: device->card_type = NV_10; break; | 164 | case 0x10: { |
165 | if (0x461 & (1 << (device->chipset & 0xf))) | ||
166 | device->card_type = NV_10; | ||
167 | else | ||
168 | device->card_type = NV_11; | ||
169 | break; | ||
170 | } | ||
165 | case 0x20: device->card_type = NV_20; break; | 171 | case 0x20: device->card_type = NV_20; break; |
166 | case 0x30: device->card_type = NV_30; break; | 172 | case 0x30: device->card_type = NV_30; break; |
167 | case 0x40: | 173 | case 0x40: |
@@ -188,7 +194,8 @@ nouveau_devobj_ctor(struct nouveau_object *parent, | |||
188 | 194 | ||
189 | switch (device->card_type) { | 195 | switch (device->card_type) { |
190 | case NV_04: ret = nv04_identify(device); break; | 196 | case NV_04: ret = nv04_identify(device); break; |
191 | case NV_10: ret = nv10_identify(device); break; | 197 | case NV_10: |
198 | case NV_11: ret = nv10_identify(device); break; | ||
192 | case NV_20: ret = nv20_identify(device); break; | 199 | case NV_20: ret = nv20_identify(device); break; |
193 | case NV_30: ret = nv30_identify(device); break; | 200 | case NV_30: ret = nv30_identify(device); break; |
194 | case NV_40: ret = nv40_identify(device); break; | 201 | case NV_40: ret = nv40_identify(device); break; |
diff --git a/drivers/gpu/drm/nouveau/core/include/core/device.h b/drivers/gpu/drm/nouveau/core/include/core/device.h index 0a1698faeff3..40c6dcf6ff63 100644 --- a/drivers/gpu/drm/nouveau/core/include/core/device.h +++ b/drivers/gpu/drm/nouveau/core/include/core/device.h | |||
@@ -72,6 +72,7 @@ struct nouveau_device { | |||
72 | enum { | 72 | enum { |
73 | NV_04 = 0x04, | 73 | NV_04 = 0x04, |
74 | NV_10 = 0x10, | 74 | NV_10 = 0x10, |
75 | NV_11 = 0x11, | ||
75 | NV_20 = 0x20, | 76 | NV_20 = 0x20, |
76 | NV_30 = 0x30, | 77 | NV_30 = 0x30, |
77 | NV_40 = 0x40, | 78 | NV_40 = 0x40, |
diff --git a/drivers/gpu/drm/nouveau/core/subdev/bios/pll.c b/drivers/gpu/drm/nouveau/core/subdev/bios/pll.c index f835501203e5..1f76de597d4b 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/bios/pll.c +++ b/drivers/gpu/drm/nouveau/core/subdev/bios/pll.c | |||
@@ -114,6 +114,7 @@ pll_map(struct nouveau_bios *bios) | |||
114 | switch (nv_device(bios)->card_type) { | 114 | switch (nv_device(bios)->card_type) { |
115 | case NV_04: | 115 | case NV_04: |
116 | case NV_10: | 116 | case NV_10: |
117 | case NV_11: | ||
117 | case NV_20: | 118 | case NV_20: |
118 | case NV_30: | 119 | case NV_30: |
119 | return nv04_pll_mapping; | 120 | return nv04_pll_mapping; |
diff --git a/drivers/gpu/drm/nouveau/dispnv04/hw.c b/drivers/gpu/drm/nouveau/dispnv04/hw.c index f8dee834527f..3d51ae9070f8 100644 --- a/drivers/gpu/drm/nouveau/dispnv04/hw.c +++ b/drivers/gpu/drm/nouveau/dispnv04/hw.c | |||
@@ -740,7 +740,7 @@ nv_load_state_ext(struct drm_device *dev, int head, | |||
740 | } | 740 | } |
741 | /* NV11 and NV20 stop at 0x52. */ | 741 | /* NV11 and NV20 stop at 0x52. */ |
742 | if (nv_gf4_disp_arch(dev)) { | 742 | if (nv_gf4_disp_arch(dev)) { |
743 | if (nv_device(drm->device)->card_type == NV_10) { | 743 | if (nv_device(drm->device)->card_type < NV_20) { |
744 | /* Not waiting for vertical retrace before modifying | 744 | /* Not waiting for vertical retrace before modifying |
745 | CRE_53/CRE_54 causes lockups. */ | 745 | CRE_53/CRE_54 causes lockups. */ |
746 | nouveau_timer_wait_eq(ptimer, 650000000, NV_PRMCIO_INP0__COLOR, 0x8, 0x8); | 746 | nouveau_timer_wait_eq(ptimer, 650000000, NV_PRMCIO_INP0__COLOR, 0x8, 0x8); |
diff --git a/drivers/gpu/drm/nouveau/nouveau_abi16.c b/drivers/gpu/drm/nouveau/nouveau_abi16.c index 72055a35f845..3621e7f23477 100644 --- a/drivers/gpu/drm/nouveau/nouveau_abi16.c +++ b/drivers/gpu/drm/nouveau/nouveau_abi16.c | |||
@@ -87,6 +87,7 @@ nouveau_abi16_swclass(struct nouveau_drm *drm) | |||
87 | case NV_04: | 87 | case NV_04: |
88 | return 0x006e; | 88 | return 0x006e; |
89 | case NV_10: | 89 | case NV_10: |
90 | case NV_11: | ||
90 | case NV_20: | 91 | case NV_20: |
91 | case NV_30: | 92 | case NV_30: |
92 | case NV_40: | 93 | case NV_40: |
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c index c28a5a9ff053..949ab0cbc4ab 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c | |||
@@ -269,7 +269,8 @@ set_placement_range(struct nouveau_bo *nvbo, uint32_t type) | |||
269 | struct nouveau_fb *pfb = nouveau_fb(drm->device); | 269 | struct nouveau_fb *pfb = nouveau_fb(drm->device); |
270 | u32 vram_pages = pfb->ram->size >> PAGE_SHIFT; | 270 | u32 vram_pages = pfb->ram->size >> PAGE_SHIFT; |
271 | 271 | ||
272 | if (nv_device(drm->device)->card_type == NV_10 && | 272 | if ((nv_device(drm->device)->card_type == NV_10 || |
273 | nv_device(drm->device)->card_type == NV_11) && | ||
273 | nvbo->tile_mode && (type & TTM_PL_FLAG_VRAM) && | 274 | nvbo->tile_mode && (type & TTM_PL_FLAG_VRAM) && |
274 | nvbo->bo.mem.num_pages < vram_pages / 4) { | 275 | nvbo->bo.mem.num_pages < vram_pages / 4) { |
275 | /* | 276 | /* |
diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c index 1aa682494a18..1674882d60d5 100644 --- a/drivers/gpu/drm/nouveau/nouveau_connector.c +++ b/drivers/gpu/drm/nouveau/nouveau_connector.c | |||
@@ -215,9 +215,10 @@ nouveau_connector_set_encoder(struct drm_connector *connector, | |||
215 | } else { | 215 | } else { |
216 | connector->doublescan_allowed = true; | 216 | connector->doublescan_allowed = true; |
217 | if (nv_device(drm->device)->card_type == NV_20 || | 217 | if (nv_device(drm->device)->card_type == NV_20 || |
218 | (nv_device(drm->device)->card_type == NV_10 && | 218 | ((nv_device(drm->device)->card_type == NV_10 || |
219 | (dev->pdev->device & 0x0ff0) != 0x0100 && | 219 | nv_device(drm->device)->card_type == NV_11) && |
220 | (dev->pdev->device & 0x0ff0) != 0x0150)) | 220 | (dev->pdev->device & 0x0ff0) != 0x0100 && |
221 | (dev->pdev->device & 0x0ff0) != 0x0150)) | ||
221 | /* HW is broken */ | 222 | /* HW is broken */ |
222 | connector->interlace_allowed = false; | 223 | connector->interlace_allowed = false; |
223 | else | 224 | else |