diff options
Diffstat (limited to 'drivers/gpu/drm/nouveau/dispnv04/dac.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/dispnv04/dac.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv04/dac.c b/drivers/gpu/drm/nouveau/dispnv04/dac.c index 81c1efb8b3b6..71e99cdfc40e 100644 --- a/drivers/gpu/drm/nouveau/dispnv04/dac.c +++ b/drivers/gpu/drm/nouveau/dispnv04/dac.c | |||
@@ -65,7 +65,8 @@ int nv04_dac_output_offset(struct drm_encoder *encoder) | |||
65 | 65 | ||
66 | static int sample_load_twice(struct drm_device *dev, bool sense[2]) | 66 | static int sample_load_twice(struct drm_device *dev, bool sense[2]) |
67 | { | 67 | { |
68 | struct nvif_device *device = &nouveau_drm(dev)->device; | 68 | struct nouveau_drm *drm = nouveau_drm(dev); |
69 | struct nvif_object *device = &drm->device.object; | ||
69 | int i; | 70 | int i; |
70 | 71 | ||
71 | for (i = 0; i < 2; i++) { | 72 | for (i = 0; i < 2; i++) { |
@@ -79,19 +80,19 @@ static int sample_load_twice(struct drm_device *dev, bool sense[2]) | |||
79 | * use a 10ms timeout (guards against crtc being inactive, in | 80 | * use a 10ms timeout (guards against crtc being inactive, in |
80 | * which case blank state would never change) | 81 | * which case blank state would never change) |
81 | */ | 82 | */ |
82 | if (nvif_msec(device, 10, | 83 | if (nvif_msec(&drm->device, 10, |
83 | if (!(nvif_rd32(device, NV_PRMCIO_INP0__COLOR) & 1)) | 84 | if (!(nvif_rd32(device, NV_PRMCIO_INP0__COLOR) & 1)) |
84 | break; | 85 | break; |
85 | ) < 0) | 86 | ) < 0) |
86 | return -EBUSY; | 87 | return -EBUSY; |
87 | 88 | ||
88 | if (nvif_msec(device, 10, | 89 | if (nvif_msec(&drm->device, 10, |
89 | if ( (nvif_rd32(device, NV_PRMCIO_INP0__COLOR) & 1)) | 90 | if ( (nvif_rd32(device, NV_PRMCIO_INP0__COLOR) & 1)) |
90 | break; | 91 | break; |
91 | ) < 0) | 92 | ) < 0) |
92 | return -EBUSY; | 93 | return -EBUSY; |
93 | 94 | ||
94 | if (nvif_msec(device, 10, | 95 | if (nvif_msec(&drm->device, 10, |
95 | if (!(nvif_rd32(device, NV_PRMCIO_INP0__COLOR) & 1)) | 96 | if (!(nvif_rd32(device, NV_PRMCIO_INP0__COLOR) & 1)) |
96 | break; | 97 | break; |
97 | ) < 0) | 98 | ) < 0) |
@@ -132,7 +133,7 @@ static enum drm_connector_status nv04_dac_detect(struct drm_encoder *encoder, | |||
132 | struct drm_connector *connector) | 133 | struct drm_connector *connector) |
133 | { | 134 | { |
134 | struct drm_device *dev = encoder->dev; | 135 | struct drm_device *dev = encoder->dev; |
135 | struct nvif_device *device = &nouveau_drm(dev)->device; | 136 | struct nvif_object *device = &nouveau_drm(dev)->device.object; |
136 | struct nouveau_drm *drm = nouveau_drm(dev); | 137 | struct nouveau_drm *drm = nouveau_drm(dev); |
137 | uint8_t saved_seq1, saved_pi, saved_rpc1, saved_cr_mode; | 138 | uint8_t saved_seq1, saved_pi, saved_rpc1, saved_cr_mode; |
138 | uint8_t saved_palette0[3], saved_palette_mask; | 139 | uint8_t saved_palette0[3], saved_palette_mask; |
@@ -235,8 +236,8 @@ uint32_t nv17_dac_sample_load(struct drm_encoder *encoder) | |||
235 | { | 236 | { |
236 | struct drm_device *dev = encoder->dev; | 237 | struct drm_device *dev = encoder->dev; |
237 | struct nouveau_drm *drm = nouveau_drm(dev); | 238 | struct nouveau_drm *drm = nouveau_drm(dev); |
238 | struct nvif_device *device = &nouveau_drm(dev)->device; | 239 | struct nvif_object *device = &nouveau_drm(dev)->device.object; |
239 | struct nvkm_gpio *gpio = nvxx_gpio(device); | 240 | struct nvkm_gpio *gpio = nvxx_gpio(&drm->device); |
240 | struct dcb_output *dcb = nouveau_encoder(encoder)->dcb; | 241 | struct dcb_output *dcb = nouveau_encoder(encoder)->dcb; |
241 | uint32_t sample, testval, regoffset = nv04_dac_output_offset(encoder); | 242 | uint32_t sample, testval, regoffset = nv04_dac_output_offset(encoder); |
242 | uint32_t saved_powerctrl_2 = 0, saved_powerctrl_4 = 0, saved_routput, | 243 | uint32_t saved_powerctrl_2 = 0, saved_powerctrl_4 = 0, saved_routput, |