aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nvc0_fbcon.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvc0_fbcon.c')
-rw-r--r--drivers/gpu/drm/nouveau/nvc0_fbcon.c54
1 files changed, 27 insertions, 27 deletions
diff --git a/drivers/gpu/drm/nouveau/nvc0_fbcon.c b/drivers/gpu/drm/nouveau/nvc0_fbcon.c
index a495e48197ca..797159e7b7a6 100644
--- a/drivers/gpu/drm/nouveau/nvc0_fbcon.c
+++ b/drivers/gpu/drm/nouveau/nvc0_fbcon.c
@@ -43,22 +43,22 @@ nvc0_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
43 return ret; 43 return ret;
44 44
45 if (rect->rop != ROP_COPY) { 45 if (rect->rop != ROP_COPY) {
46 BEGIN_NVC0(chan, 2, NvSub2D, 0x02ac, 1); 46 BEGIN_NVC0(chan, NvSub2D, 0x02ac, 1);
47 OUT_RING (chan, 1); 47 OUT_RING (chan, 1);
48 } 48 }
49 BEGIN_NVC0(chan, 2, NvSub2D, 0x0588, 1); 49 BEGIN_NVC0(chan, NvSub2D, 0x0588, 1);
50 if (info->fix.visual == FB_VISUAL_TRUECOLOR || 50 if (info->fix.visual == FB_VISUAL_TRUECOLOR ||
51 info->fix.visual == FB_VISUAL_DIRECTCOLOR) 51 info->fix.visual == FB_VISUAL_DIRECTCOLOR)
52 OUT_RING (chan, ((uint32_t *)info->pseudo_palette)[rect->color]); 52 OUT_RING (chan, ((uint32_t *)info->pseudo_palette)[rect->color]);
53 else 53 else
54 OUT_RING (chan, rect->color); 54 OUT_RING (chan, rect->color);
55 BEGIN_NVC0(chan, 2, NvSub2D, 0x0600, 4); 55 BEGIN_NVC0(chan, NvSub2D, 0x0600, 4);
56 OUT_RING (chan, rect->dx); 56 OUT_RING (chan, rect->dx);
57 OUT_RING (chan, rect->dy); 57 OUT_RING (chan, rect->dy);
58 OUT_RING (chan, rect->dx + rect->width); 58 OUT_RING (chan, rect->dx + rect->width);
59 OUT_RING (chan, rect->dy + rect->height); 59 OUT_RING (chan, rect->dy + rect->height);
60 if (rect->rop != ROP_COPY) { 60 if (rect->rop != ROP_COPY) {
61 BEGIN_NVC0(chan, 2, NvSub2D, 0x02ac, 1); 61 BEGIN_NVC0(chan, NvSub2D, 0x02ac, 1);
62 OUT_RING (chan, 3); 62 OUT_RING (chan, 3);
63 } 63 }
64 FIRE_RING(chan); 64 FIRE_RING(chan);
@@ -78,14 +78,14 @@ nvc0_fbcon_copyarea(struct fb_info *info, const struct fb_copyarea *region)
78 if (ret) 78 if (ret)
79 return ret; 79 return ret;
80 80
81 BEGIN_NVC0(chan, 2, NvSub2D, 0x0110, 1); 81 BEGIN_NVC0(chan, NvSub2D, 0x0110, 1);
82 OUT_RING (chan, 0); 82 OUT_RING (chan, 0);
83 BEGIN_NVC0(chan, 2, NvSub2D, 0x08b0, 4); 83 BEGIN_NVC0(chan, NvSub2D, 0x08b0, 4);
84 OUT_RING (chan, region->dx); 84 OUT_RING (chan, region->dx);
85 OUT_RING (chan, region->dy); 85 OUT_RING (chan, region->dy);
86 OUT_RING (chan, region->width); 86 OUT_RING (chan, region->width);
87 OUT_RING (chan, region->height); 87 OUT_RING (chan, region->height);
88 BEGIN_NVC0(chan, 2, NvSub2D, 0x08d0, 4); 88 BEGIN_NVC0(chan, NvSub2D, 0x08d0, 4);
89 OUT_RING (chan, 0); 89 OUT_RING (chan, 0);
90 OUT_RING (chan, region->sx); 90 OUT_RING (chan, region->sx);
91 OUT_RING (chan, 0); 91 OUT_RING (chan, 0);
@@ -116,7 +116,7 @@ nvc0_fbcon_imageblit(struct fb_info *info, const struct fb_image *image)
116 width = ALIGN(image->width, 32); 116 width = ALIGN(image->width, 32);
117 dwords = (width * image->height) >> 5; 117 dwords = (width * image->height) >> 5;
118 118
119 BEGIN_NVC0(chan, 2, NvSub2D, 0x0814, 2); 119 BEGIN_NVC0(chan, NvSub2D, 0x0814, 2);
120 if (info->fix.visual == FB_VISUAL_TRUECOLOR || 120 if (info->fix.visual == FB_VISUAL_TRUECOLOR ||
121 info->fix.visual == FB_VISUAL_DIRECTCOLOR) { 121 info->fix.visual == FB_VISUAL_DIRECTCOLOR) {
122 OUT_RING (chan, palette[image->bg_color] | mask); 122 OUT_RING (chan, palette[image->bg_color] | mask);
@@ -125,10 +125,10 @@ nvc0_fbcon_imageblit(struct fb_info *info, const struct fb_image *image)
125 OUT_RING (chan, image->bg_color); 125 OUT_RING (chan, image->bg_color);
126 OUT_RING (chan, image->fg_color); 126 OUT_RING (chan, image->fg_color);
127 } 127 }
128 BEGIN_NVC0(chan, 2, NvSub2D, 0x0838, 2); 128 BEGIN_NVC0(chan, NvSub2D, 0x0838, 2);
129 OUT_RING (chan, image->width); 129 OUT_RING (chan, image->width);
130 OUT_RING (chan, image->height); 130 OUT_RING (chan, image->height);
131 BEGIN_NVC0(chan, 2, NvSub2D, 0x0850, 4); 131 BEGIN_NVC0(chan, NvSub2D, 0x0850, 4);
132 OUT_RING (chan, 0); 132 OUT_RING (chan, 0);
133 OUT_RING (chan, image->dx); 133 OUT_RING (chan, image->dx);
134 OUT_RING (chan, 0); 134 OUT_RING (chan, 0);
@@ -143,7 +143,7 @@ nvc0_fbcon_imageblit(struct fb_info *info, const struct fb_image *image)
143 143
144 dwords -= push; 144 dwords -= push;
145 145
146 BEGIN_NVC0(chan, 6, NvSub2D, 0x0860, push); 146 BEGIN_NIC0(chan, NvSub2D, 0x0860, push);
147 OUT_RINGp(chan, data, push); 147 OUT_RINGp(chan, data, push);
148 data += push; 148 data += push;
149 } 149 }
@@ -200,47 +200,47 @@ nvc0_fbcon_accel_init(struct fb_info *info)
200 return ret; 200 return ret;
201 } 201 }
202 202
203 BEGIN_NVC0(chan, 2, NvSub2D, 0x0000, 1); 203 BEGIN_NVC0(chan, NvSub2D, 0x0000, 1);
204 OUT_RING (chan, 0x0000902d); 204 OUT_RING (chan, 0x0000902d);
205 BEGIN_NVC0(chan, 2, NvSub2D, 0x0104, 2); 205 BEGIN_NVC0(chan, NvSub2D, 0x0104, 2);
206 OUT_RING (chan, upper_32_bits(chan->notifier_vma.offset)); 206 OUT_RING (chan, upper_32_bits(chan->notifier_vma.offset));
207 OUT_RING (chan, lower_32_bits(chan->notifier_vma.offset)); 207 OUT_RING (chan, lower_32_bits(chan->notifier_vma.offset));
208 BEGIN_NVC0(chan, 2, NvSub2D, 0x0290, 1); 208 BEGIN_NVC0(chan, NvSub2D, 0x0290, 1);
209 OUT_RING (chan, 0); 209 OUT_RING (chan, 0);
210 BEGIN_NVC0(chan, 2, NvSub2D, 0x0888, 1); 210 BEGIN_NVC0(chan, NvSub2D, 0x0888, 1);
211 OUT_RING (chan, 1); 211 OUT_RING (chan, 1);
212 BEGIN_NVC0(chan, 2, NvSub2D, 0x02ac, 1); 212 BEGIN_NVC0(chan, NvSub2D, 0x02ac, 1);
213 OUT_RING (chan, 3); 213 OUT_RING (chan, 3);
214 BEGIN_NVC0(chan, 2, NvSub2D, 0x02a0, 1); 214 BEGIN_NVC0(chan, NvSub2D, 0x02a0, 1);
215 OUT_RING (chan, 0x55); 215 OUT_RING (chan, 0x55);
216 BEGIN_NVC0(chan, 2, NvSub2D, 0x08c0, 4); 216 BEGIN_NVC0(chan, NvSub2D, 0x08c0, 4);
217 OUT_RING (chan, 0); 217 OUT_RING (chan, 0);
218 OUT_RING (chan, 1); 218 OUT_RING (chan, 1);
219 OUT_RING (chan, 0); 219 OUT_RING (chan, 0);
220 OUT_RING (chan, 1); 220 OUT_RING (chan, 1);
221 BEGIN_NVC0(chan, 2, NvSub2D, 0x0580, 2); 221 BEGIN_NVC0(chan, NvSub2D, 0x0580, 2);
222 OUT_RING (chan, 4); 222 OUT_RING (chan, 4);
223 OUT_RING (chan, format); 223 OUT_RING (chan, format);
224 BEGIN_NVC0(chan, 2, NvSub2D, 0x02e8, 2); 224 BEGIN_NVC0(chan, NvSub2D, 0x02e8, 2);
225 OUT_RING (chan, 2); 225 OUT_RING (chan, 2);
226 OUT_RING (chan, 1); 226 OUT_RING (chan, 1);
227 227
228 BEGIN_NVC0(chan, 2, NvSub2D, 0x0804, 1); 228 BEGIN_NVC0(chan, NvSub2D, 0x0804, 1);
229 OUT_RING (chan, format); 229 OUT_RING (chan, format);
230 BEGIN_NVC0(chan, 2, NvSub2D, 0x0800, 1); 230 BEGIN_NVC0(chan, NvSub2D, 0x0800, 1);
231 OUT_RING (chan, 1); 231 OUT_RING (chan, 1);
232 BEGIN_NVC0(chan, 2, NvSub2D, 0x0808, 3); 232 BEGIN_NVC0(chan, NvSub2D, 0x0808, 3);
233 OUT_RING (chan, 0); 233 OUT_RING (chan, 0);
234 OUT_RING (chan, 0); 234 OUT_RING (chan, 0);
235 OUT_RING (chan, 1); 235 OUT_RING (chan, 1);
236 BEGIN_NVC0(chan, 2, NvSub2D, 0x081c, 1); 236 BEGIN_NVC0(chan, NvSub2D, 0x081c, 1);
237 OUT_RING (chan, 1); 237 OUT_RING (chan, 1);
238 BEGIN_NVC0(chan, 2, NvSub2D, 0x0840, 4); 238 BEGIN_NVC0(chan, NvSub2D, 0x0840, 4);
239 OUT_RING (chan, 0); 239 OUT_RING (chan, 0);
240 OUT_RING (chan, 1); 240 OUT_RING (chan, 1);
241 OUT_RING (chan, 0); 241 OUT_RING (chan, 0);
242 OUT_RING (chan, 1); 242 OUT_RING (chan, 1);
243 BEGIN_NVC0(chan, 2, NvSub2D, 0x0200, 10); 243 BEGIN_NVC0(chan, NvSub2D, 0x0200, 10);
244 OUT_RING (chan, format); 244 OUT_RING (chan, format);
245 OUT_RING (chan, 1); 245 OUT_RING (chan, 1);
246 OUT_RING (chan, 0); 246 OUT_RING (chan, 0);
@@ -251,7 +251,7 @@ nvc0_fbcon_accel_init(struct fb_info *info)
251 OUT_RING (chan, info->var.yres_virtual); 251 OUT_RING (chan, info->var.yres_virtual);
252 OUT_RING (chan, upper_32_bits(fb->vma.offset)); 252 OUT_RING (chan, upper_32_bits(fb->vma.offset));
253 OUT_RING (chan, lower_32_bits(fb->vma.offset)); 253 OUT_RING (chan, lower_32_bits(fb->vma.offset));
254 BEGIN_NVC0(chan, 2, NvSub2D, 0x0230, 10); 254 BEGIN_NVC0(chan, NvSub2D, 0x0230, 10);
255 OUT_RING (chan, format); 255 OUT_RING (chan, format);
256 OUT_RING (chan, 1); 256 OUT_RING (chan, 1);
257 OUT_RING (chan, 0); 257 OUT_RING (chan, 0);