summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bin/nv_disp.c4
-rw-r--r--drm/nouveau_abi16.c1
-rw-r--r--drm/nouveau_backlight.c1
-rw-r--r--drm/nouveau_display.c57
-rw-r--r--drm/nouveau_ttm.c1
-rw-r--r--nvkm/engine/device/base.c10
-rw-r--r--nvkm/include/core/device.h1
7 files changed, 39 insertions, 36 deletions
diff --git a/bin/nv_disp.c b/bin/nv_disp.c
index f96c4a0ac..b083e5219 100644
--- a/bin/nv_disp.c
+++ b/bin/nv_disp.c
@@ -10,7 +10,7 @@ static void
nv_disp(struct nouveau_object *device, u16 mthd, u32 data)
{
if (nv_device(device)->card_type >= NV_50 &&
- nv_device(device)->card_type <= NV_C0) {
+ nv_device(device)->chipset < 0xd0) {
u32 ctrl = nv_ro32(device, 0x610300 + (chan * 8));
nv_wo32(device, 0x610300 + (chan * 8), ctrl | 0x00000001);
nv_wo32(device, 0x610304 + (chan * 8), data);
@@ -18,7 +18,7 @@ nv_disp(struct nouveau_object *device, u16 mthd, u32 data)
while (nv_ro32(device, 0x610300 + (chan * 8)) & 0x80000000) {}
nv_wo32(device, 0x610300 + (chan * 8), ctrl);
} else
- if (nv_device(device)->card_type >= NV_D0 &&
+ if (nv_device(device)->chipset >= 0xd0 &&
nv_device(device)->card_type <= NV_E0) {
u32 ctrl = nv_ro32(device, 0x610700 + (chan * 16));
nv_wo32(device, 0x610700 + (chan * 16), ctrl | 0x00000001);
diff --git a/drm/nouveau_abi16.c b/drm/nouveau_abi16.c
index b13f441c6..b04377830 100644
--- a/drm/nouveau_abi16.c
+++ b/drm/nouveau_abi16.c
@@ -95,7 +95,6 @@ nouveau_abi16_swclass(struct nouveau_drm *drm)
case NV_50:
return 0x506e;
case NV_C0:
- case NV_D0:
case NV_E0:
case GM100:
return 0x906e;
diff --git a/drm/nouveau_backlight.c b/drm/nouveau_backlight.c
index 2c1e4aad7..3986d198e 100644
--- a/drm/nouveau_backlight.c
+++ b/drm/nouveau_backlight.c
@@ -231,7 +231,6 @@ nouveau_backlight_init(struct drm_device *dev)
return nv40_backlight_init(connector);
case NV_50:
case NV_C0:
- case NV_D0:
case NV_E0:
return nv50_backlight_init(connector);
default:
diff --git a/drm/nouveau_display.c b/drm/nouveau_display.c
index ff43b41af..6e9892c9f 100644
--- a/drm/nouveau_display.c
+++ b/drm/nouveau_display.c
@@ -393,26 +393,16 @@ nouveau_display_fini(struct drm_device *dev)
disp->fini(dev);
}
-int
-nouveau_display_create(struct drm_device *dev)
+static void
+nouveau_display_create_properties(struct drm_device *dev)
{
- struct nouveau_drm *drm = nouveau_drm(dev);
- struct nouveau_device *device = nouveau_dev(dev);
- struct nouveau_display *disp;
- int ret, gen;
-
- disp = drm->display = kzalloc(sizeof(*disp), GFP_KERNEL);
- if (!disp)
- return -ENOMEM;
-
- drm_mode_config_init(dev);
- drm_mode_create_scaling_mode_property(dev);
- drm_mode_create_dvi_i_properties(dev);
+ struct nouveau_display *disp = nouveau_display(dev);
+ int gen;
- if (nv_device(drm->device)->card_type < NV_50)
+ if (nv_mclass(disp->core) < NV50_DISP_CLASS)
gen = 0;
else
- if (nv_device(drm->device)->card_type < NV_D0)
+ if (nv_mclass(disp->core) < NVD0_DISP_CLASS)
gen = 1;
else
gen = 2;
@@ -427,15 +417,33 @@ nouveau_display_create(struct drm_device *dev)
disp->underscan_vborder_property =
drm_property_create_range(dev, 0, "underscan vborder", 0, 128);
- if (gen >= 1) {
- /* -90..+90 */
- disp->vibrant_hue_property =
- drm_property_create_range(dev, 0, "vibrant hue", 0, 180);
+ if (gen < 1)
+ return;
- /* -100..+100 */
- disp->color_vibrance_property =
- drm_property_create_range(dev, 0, "color vibrance", 0, 200);
- }
+ /* -90..+90 */
+ disp->vibrant_hue_property =
+ drm_property_create_range(dev, 0, "vibrant hue", 0, 180);
+
+ /* -100..+100 */
+ disp->color_vibrance_property =
+ drm_property_create_range(dev, 0, "color vibrance", 0, 200);
+}
+
+int
+nouveau_display_create(struct drm_device *dev)
+{
+ struct nouveau_drm *drm = nouveau_drm(dev);
+ struct nouveau_device *device = nouveau_dev(dev);
+ struct nouveau_display *disp;
+ int ret;
+
+ disp = drm->display = kzalloc(sizeof(*disp), GFP_KERNEL);
+ if (!disp)
+ return -ENOMEM;
+
+ drm_mode_config_init(dev);
+ drm_mode_create_scaling_mode_property(dev);
+ drm_mode_create_dvi_i_properties(dev);
dev->mode_config.funcs = &nouveau_mode_config_funcs;
dev->mode_config.fb_base = nv_device_resource_start(device, 1);
@@ -487,6 +495,7 @@ nouveau_display_create(struct drm_device *dev)
}
if (ret == 0) {
+ nouveau_display_create_properties(dev);
if (nv_mclass(disp->core) < NV50_DISP_CLASS)
ret = nv04_display_create(dev);
else
diff --git a/drm/nouveau_ttm.c b/drm/nouveau_ttm.c
index 7e185c122..1f42cae2c 100644
--- a/drm/nouveau_ttm.c
+++ b/drm/nouveau_ttm.c
@@ -182,7 +182,6 @@ nouveau_gart_manager_new(struct ttm_mem_type_manager *man,
node->memtype = (nvbo->tile_flags & 0x7f00) >> 8;
break;
case NV_C0:
- case NV_D0:
case NV_E0:
node->memtype = (nvbo->tile_flags & 0xff00) >> 8;
break;
diff --git a/nvkm/engine/device/base.c b/nvkm/engine/device/base.c
index c24fc604f..a5e10d351 100644
--- a/nvkm/engine/device/base.c
+++ b/nvkm/engine/device/base.c
@@ -116,8 +116,7 @@ nouveau_devobj_info(struct nouveau_object *object, void *data, u32 size)
case NV_30: args->v0.family = NV_DEVICE_INFO_V0_RANKINE; break;
case NV_40: args->v0.family = NV_DEVICE_INFO_V0_CURIE; break;
case NV_50: args->v0.family = NV_DEVICE_INFO_V0_TESLA; break;
- case NV_C0:
- case NV_D0: args->v0.family = NV_DEVICE_INFO_V0_FERMI; break;
+ case NV_C0: args->v0.family = NV_DEVICE_INFO_V0_FERMI; break;
case NV_E0: args->v0.family = NV_DEVICE_INFO_V0_KEPLER; break;
case GM100: args->v0.family = NV_DEVICE_INFO_V0_MAXWELL; break;
default:
@@ -305,8 +304,8 @@ nouveau_devobj_ctor(struct nouveau_object *parent,
case 0x080:
case 0x090:
case 0x0a0: device->card_type = NV_50; break;
- case 0x0c0: device->card_type = NV_C0; break;
- case 0x0d0: device->card_type = NV_D0; break;
+ case 0x0c0:
+ case 0x0d0: device->card_type = NV_C0; break;
case 0x0e0:
case 0x0f0:
case 0x100: device->card_type = NV_E0; break;
@@ -331,8 +330,7 @@ nouveau_devobj_ctor(struct nouveau_object *parent,
case NV_30: ret = nv30_identify(device); break;
case NV_40: ret = nv40_identify(device); break;
case NV_50: ret = nv50_identify(device); break;
- case NV_C0:
- case NV_D0: ret = nvc0_identify(device); break;
+ case NV_C0: ret = nvc0_identify(device); break;
case NV_E0: ret = nve0_identify(device); break;
case GM100: ret = gm100_identify(device); break;
default:
diff --git a/nvkm/include/core/device.h b/nvkm/include/core/device.h
index 0e410363f..a45ece151 100644
--- a/nvkm/include/core/device.h
+++ b/nvkm/include/core/device.h
@@ -87,7 +87,6 @@ struct nouveau_device {
NV_40 = 0x40,
NV_50 = 0x50,
NV_C0 = 0xc0,
- NV_D0 = 0xd0,
NV_E0 = 0xe0,
GM100 = 0x110,
} card_type;