@@ -194,16 +194,30 @@ head507d_core_set(struct nv50_head *head, struct nv50_head_atom *asyh)
194
194
if ((ret = PUSH_WAIT (push , 9 )))
195
195
return ret ;
196
196
197
- PUSH_NVSQ (push , NV507D , 0x0860 + (i * 0x400 ), asyh -> core .offset >> 8 );
198
- PUSH_NVSQ (push , NV507D , 0x0868 + (i * 0x400 ), asyh -> core .h << 16 | asyh -> core .w ,
199
- 0x086c + (i * 0x400 ), asyh -> core .layout << 20 |
200
- (asyh -> core .pitch >> 8 ) << 8 |
201
- asyh -> core .blocks << 8 |
202
- asyh -> core .blockh ,
203
- 0x0870 + (i * 0x400 ), asyh -> core .kind << 16 |
204
- asyh -> core .format << 8 ,
205
- 0x0874 + (i * 0x400 ), asyh -> core .handle );
206
- PUSH_NVSQ (push , NV507D , 0x08c0 + (i * 0x400 ), asyh -> core .y << 16 | asyh -> core .x );
197
+ PUSH_MTHD (push , NV507D , HEAD_SET_OFFSET (i , 0 ),
198
+ NVVAL (NV507D , HEAD_SET_OFFSET , ORIGIN , asyh -> core .offset >> 8 ));
199
+
200
+ PUSH_MTHD (push , NV507D , HEAD_SET_SIZE (i ),
201
+ NVVAL (NV507D , HEAD_SET_SIZE , WIDTH , asyh -> core .w ) |
202
+ NVVAL (NV507D , HEAD_SET_SIZE , HEIGHT , asyh -> core .h ),
203
+
204
+ HEAD_SET_STORAGE (i ),
205
+ NVVAL (NV507D , HEAD_SET_STORAGE , BLOCK_HEIGHT , asyh -> core .blockh ) |
206
+ NVVAL (NV507D , HEAD_SET_STORAGE , PITCH , asyh -> core .pitch >> 8 ) |
207
+ NVVAL (NV507D , HEAD_SET_STORAGE , PITCH , asyh -> core .blocks ) |
208
+ NVVAL (NV507D , HEAD_SET_STORAGE , MEMORY_LAYOUT , asyh -> core .layout ),
209
+
210
+ HEAD_SET_PARAMS (i ),
211
+ NVVAL (NV507D , HEAD_SET_PARAMS , FORMAT , asyh -> core .format ) |
212
+ NVVAL (NV507D , HEAD_SET_PARAMS , KIND , asyh -> core .kind ) |
213
+ NVDEF (NV507D , HEAD_SET_PARAMS , PART_STRIDE , PARTSTRIDE_256 ),
214
+
215
+ HEAD_SET_CONTEXT_DMA_ISO (i ),
216
+ NVVAL (NV507D , HEAD_SET_CONTEXT_DMA_ISO , HANDLE , asyh -> core .handle ));
217
+
218
+ PUSH_MTHD (push , NV507D , HEAD_SET_VIEWPORT_POINT_IN (i , 0 ),
219
+ NVVAL (NV507D , HEAD_SET_VIEWPORT_POINT_IN , X , asyh -> core .x ) |
220
+ NVVAL (NV507D , HEAD_SET_VIEWPORT_POINT_IN , Y , asyh -> core .y ));
207
221
208
222
/* EVO will complain with INVALID_STATE if we have an
209
223
* active cursor and (re)specify HeadSetContextDmaIso
@@ -238,10 +252,10 @@ head507d_core_calc(struct nv50_head *head, struct nv50_head_atom *asyh)
238
252
}
239
253
asyh -> core .handle = disp -> core -> chan .vram .handle ;
240
254
asyh -> core .offset = 0 ;
241
- asyh -> core .format = 0xcf ;
242
- asyh -> core .kind = 0 ;
243
- asyh -> core .layout = 1 ;
244
- asyh -> core .blockh = 0 ;
255
+ asyh -> core .format = NV507D_HEAD_SET_PARAMS_FORMAT_A8R8G8B8 ;
256
+ asyh -> core .kind = NV507D_HEAD_SET_PARAMS_KIND_KIND_PITCH ;
257
+ asyh -> core .layout = NV507D_HEAD_SET_STORAGE_MEMORY_LAYOUT_PITCH ;
258
+ asyh -> core .blockh = NV507D_HEAD_SET_STORAGE_BLOCK_HEIGHT_ONE_GOB ;
245
259
asyh -> core .blocks = 0 ;
246
260
asyh -> core .pitch = ALIGN (asyh -> core .w , 64 ) * 4 ;
247
261
}
0 commit comments