18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * Copyright 2010 Red Hat Inc. 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * Permission is hereby granted, free of charge, to any person obtaining a 58c2ecf20Sopenharmony_ci * copy of this software and associated documentation files (the "Software"), 68c2ecf20Sopenharmony_ci * to deal in the Software without restriction, including without limitation 78c2ecf20Sopenharmony_ci * the rights to use, copy, modify, merge, publish, distribute, sublicense, 88c2ecf20Sopenharmony_ci * and/or sell copies of the Software, and to permit persons to whom the 98c2ecf20Sopenharmony_ci * Software is furnished to do so, subject to the following conditions: 108c2ecf20Sopenharmony_ci * 118c2ecf20Sopenharmony_ci * The above copyright notice and this permission notice shall be included in 128c2ecf20Sopenharmony_ci * all copies or substantial portions of the Software. 138c2ecf20Sopenharmony_ci * 148c2ecf20Sopenharmony_ci * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 158c2ecf20Sopenharmony_ci * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 168c2ecf20Sopenharmony_ci * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 178c2ecf20Sopenharmony_ci * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 188c2ecf20Sopenharmony_ci * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 198c2ecf20Sopenharmony_ci * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 208c2ecf20Sopenharmony_ci * OTHER DEALINGS IN THE SOFTWARE. 218c2ecf20Sopenharmony_ci * 228c2ecf20Sopenharmony_ci * Authors: Ben Skeggs 238c2ecf20Sopenharmony_ci */ 248c2ecf20Sopenharmony_ci#define NVIF_DEBUG_PRINT_DISABLE 258c2ecf20Sopenharmony_ci#include "nouveau_drv.h" 268c2ecf20Sopenharmony_ci#include "nouveau_dma.h" 278c2ecf20Sopenharmony_ci#include "nouveau_fbcon.h" 288c2ecf20Sopenharmony_ci#include "nouveau_vmm.h" 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ci#include <nvif/push906f.h> 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_ci#include <nvhw/class/cl902d.h> 338c2ecf20Sopenharmony_ci 348c2ecf20Sopenharmony_ciint 358c2ecf20Sopenharmony_cinvc0_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect) 368c2ecf20Sopenharmony_ci{ 378c2ecf20Sopenharmony_ci struct nouveau_fbdev *nfbdev = info->par; 388c2ecf20Sopenharmony_ci struct nouveau_drm *drm = nouveau_drm(nfbdev->helper.dev); 398c2ecf20Sopenharmony_ci struct nouveau_channel *chan = drm->channel; 408c2ecf20Sopenharmony_ci struct nvif_push *push = chan->chan.push; 418c2ecf20Sopenharmony_ci u32 colour; 428c2ecf20Sopenharmony_ci int ret; 438c2ecf20Sopenharmony_ci 448c2ecf20Sopenharmony_ci if (info->fix.visual == FB_VISUAL_TRUECOLOR || 458c2ecf20Sopenharmony_ci info->fix.visual == FB_VISUAL_DIRECTCOLOR) 468c2ecf20Sopenharmony_ci colour = ((uint32_t *)info->pseudo_palette)[rect->color]; 478c2ecf20Sopenharmony_ci else 488c2ecf20Sopenharmony_ci colour = rect->color; 498c2ecf20Sopenharmony_ci 508c2ecf20Sopenharmony_ci ret = PUSH_WAIT(push, rect->rop == ROP_COPY ? 7 : 9); 518c2ecf20Sopenharmony_ci if (ret) 528c2ecf20Sopenharmony_ci return ret; 538c2ecf20Sopenharmony_ci 548c2ecf20Sopenharmony_ci if (rect->rop != ROP_COPY) { 558c2ecf20Sopenharmony_ci PUSH_IMMD(push, NV902D, SET_OPERATION, 568c2ecf20Sopenharmony_ci NVDEF(NV902D, SET_OPERATION, V, ROP_AND)); 578c2ecf20Sopenharmony_ci } 588c2ecf20Sopenharmony_ci 598c2ecf20Sopenharmony_ci PUSH_MTHD(push, NV902D, SET_RENDER_SOLID_PRIM_COLOR, colour); 608c2ecf20Sopenharmony_ci 618c2ecf20Sopenharmony_ci PUSH_MTHD(push, NV902D, RENDER_SOLID_PRIM_POINT_SET_X(0), rect->dx, 628c2ecf20Sopenharmony_ci RENDER_SOLID_PRIM_POINT_Y(0), rect->dy, 638c2ecf20Sopenharmony_ci RENDER_SOLID_PRIM_POINT_SET_X(1), rect->dx + rect->width, 648c2ecf20Sopenharmony_ci RENDER_SOLID_PRIM_POINT_Y(1), rect->dy + rect->height); 658c2ecf20Sopenharmony_ci 668c2ecf20Sopenharmony_ci if (rect->rop != ROP_COPY) { 678c2ecf20Sopenharmony_ci PUSH_IMMD(push, NV902D, SET_OPERATION, 688c2ecf20Sopenharmony_ci NVDEF(NV902D, SET_OPERATION, V, SRCCOPY)); 698c2ecf20Sopenharmony_ci } 708c2ecf20Sopenharmony_ci 718c2ecf20Sopenharmony_ci PUSH_KICK(push); 728c2ecf20Sopenharmony_ci return 0; 738c2ecf20Sopenharmony_ci} 748c2ecf20Sopenharmony_ci 758c2ecf20Sopenharmony_ciint 768c2ecf20Sopenharmony_cinvc0_fbcon_copyarea(struct fb_info *info, const struct fb_copyarea *region) 778c2ecf20Sopenharmony_ci{ 788c2ecf20Sopenharmony_ci struct nouveau_fbdev *nfbdev = info->par; 798c2ecf20Sopenharmony_ci struct nouveau_drm *drm = nouveau_drm(nfbdev->helper.dev); 808c2ecf20Sopenharmony_ci struct nouveau_channel *chan = drm->channel; 818c2ecf20Sopenharmony_ci struct nvif_push *push = chan->chan.push; 828c2ecf20Sopenharmony_ci int ret; 838c2ecf20Sopenharmony_ci 848c2ecf20Sopenharmony_ci ret = PUSH_WAIT(push, 11); 858c2ecf20Sopenharmony_ci if (ret) 868c2ecf20Sopenharmony_ci return ret; 878c2ecf20Sopenharmony_ci 888c2ecf20Sopenharmony_ci PUSH_IMMD(push, NV902D, WAIT_FOR_IDLE, 0); 898c2ecf20Sopenharmony_ci 908c2ecf20Sopenharmony_ci PUSH_MTHD(push, NV902D, SET_PIXELS_FROM_MEMORY_DST_X0, region->dx, 918c2ecf20Sopenharmony_ci SET_PIXELS_FROM_MEMORY_DST_Y0, region->dy, 928c2ecf20Sopenharmony_ci SET_PIXELS_FROM_MEMORY_DST_WIDTH, region->width, 938c2ecf20Sopenharmony_ci SET_PIXELS_FROM_MEMORY_DST_HEIGHT, region->height); 948c2ecf20Sopenharmony_ci 958c2ecf20Sopenharmony_ci PUSH_MTHD(push, NV902D, SET_PIXELS_FROM_MEMORY_SRC_X0_FRAC, 0, 968c2ecf20Sopenharmony_ci SET_PIXELS_FROM_MEMORY_SRC_X0_INT, region->sx, 978c2ecf20Sopenharmony_ci SET_PIXELS_FROM_MEMORY_SRC_Y0_FRAC, 0, 988c2ecf20Sopenharmony_ci PIXELS_FROM_MEMORY_SRC_Y0_INT, region->sy); 998c2ecf20Sopenharmony_ci PUSH_KICK(push); 1008c2ecf20Sopenharmony_ci return 0; 1018c2ecf20Sopenharmony_ci} 1028c2ecf20Sopenharmony_ci 1038c2ecf20Sopenharmony_ciint 1048c2ecf20Sopenharmony_cinvc0_fbcon_imageblit(struct fb_info *info, const struct fb_image *image) 1058c2ecf20Sopenharmony_ci{ 1068c2ecf20Sopenharmony_ci struct nouveau_fbdev *nfbdev = info->par; 1078c2ecf20Sopenharmony_ci struct nouveau_drm *drm = nouveau_drm(nfbdev->helper.dev); 1088c2ecf20Sopenharmony_ci struct nouveau_channel *chan = drm->channel; 1098c2ecf20Sopenharmony_ci struct nvif_push *push = chan->chan.push; 1108c2ecf20Sopenharmony_ci uint32_t dwords, *data = (uint32_t *)image->data; 1118c2ecf20Sopenharmony_ci uint32_t mask = ~(~0 >> (32 - info->var.bits_per_pixel)); 1128c2ecf20Sopenharmony_ci uint32_t *palette = info->pseudo_palette, bg, fg; 1138c2ecf20Sopenharmony_ci int ret; 1148c2ecf20Sopenharmony_ci 1158c2ecf20Sopenharmony_ci if (image->depth != 1) 1168c2ecf20Sopenharmony_ci return -ENODEV; 1178c2ecf20Sopenharmony_ci 1188c2ecf20Sopenharmony_ci if (info->fix.visual == FB_VISUAL_TRUECOLOR || 1198c2ecf20Sopenharmony_ci info->fix.visual == FB_VISUAL_DIRECTCOLOR) { 1208c2ecf20Sopenharmony_ci bg = palette[image->bg_color] | mask; 1218c2ecf20Sopenharmony_ci fg = palette[image->fg_color] | mask; 1228c2ecf20Sopenharmony_ci } else { 1238c2ecf20Sopenharmony_ci bg = image->bg_color; 1248c2ecf20Sopenharmony_ci fg = image->fg_color; 1258c2ecf20Sopenharmony_ci } 1268c2ecf20Sopenharmony_ci 1278c2ecf20Sopenharmony_ci ret = PUSH_WAIT(push, 11); 1288c2ecf20Sopenharmony_ci if (ret) 1298c2ecf20Sopenharmony_ci return ret; 1308c2ecf20Sopenharmony_ci 1318c2ecf20Sopenharmony_ci PUSH_MTHD(push, NV902D, SET_PIXELS_FROM_CPU_COLOR0, bg, 1328c2ecf20Sopenharmony_ci SET_PIXELS_FROM_CPU_COLOR1, fg); 1338c2ecf20Sopenharmony_ci 1348c2ecf20Sopenharmony_ci PUSH_MTHD(push, NV902D, SET_PIXELS_FROM_CPU_SRC_WIDTH, image->width, 1358c2ecf20Sopenharmony_ci SET_PIXELS_FROM_CPU_SRC_HEIGHT, image->height); 1368c2ecf20Sopenharmony_ci 1378c2ecf20Sopenharmony_ci PUSH_MTHD(push, NV902D, SET_PIXELS_FROM_CPU_DST_X0_FRAC, 0, 1388c2ecf20Sopenharmony_ci SET_PIXELS_FROM_CPU_DST_X0_INT, image->dx, 1398c2ecf20Sopenharmony_ci SET_PIXELS_FROM_CPU_DST_Y0_FRAC, 0, 1408c2ecf20Sopenharmony_ci SET_PIXELS_FROM_CPU_DST_Y0_INT, image->dy); 1418c2ecf20Sopenharmony_ci 1428c2ecf20Sopenharmony_ci dwords = ALIGN(ALIGN(image->width, 8) * image->height, 32) >> 5; 1438c2ecf20Sopenharmony_ci while (dwords) { 1448c2ecf20Sopenharmony_ci int count = dwords > 2047 ? 2047 : dwords; 1458c2ecf20Sopenharmony_ci 1468c2ecf20Sopenharmony_ci ret = PUSH_WAIT(push, count + 1); 1478c2ecf20Sopenharmony_ci if (ret) 1488c2ecf20Sopenharmony_ci return ret; 1498c2ecf20Sopenharmony_ci 1508c2ecf20Sopenharmony_ci dwords -= count; 1518c2ecf20Sopenharmony_ci 1528c2ecf20Sopenharmony_ci PUSH_NINC(push, NV902D, PIXELS_FROM_CPU_DATA, data, count); 1538c2ecf20Sopenharmony_ci data += count; 1548c2ecf20Sopenharmony_ci } 1558c2ecf20Sopenharmony_ci 1568c2ecf20Sopenharmony_ci PUSH_KICK(push); 1578c2ecf20Sopenharmony_ci return 0; 1588c2ecf20Sopenharmony_ci} 1598c2ecf20Sopenharmony_ci 1608c2ecf20Sopenharmony_ciint 1618c2ecf20Sopenharmony_cinvc0_fbcon_accel_init(struct fb_info *info) 1628c2ecf20Sopenharmony_ci{ 1638c2ecf20Sopenharmony_ci struct nouveau_fbdev *nfbdev = info->par; 1648c2ecf20Sopenharmony_ci struct drm_device *dev = nfbdev->helper.dev; 1658c2ecf20Sopenharmony_ci struct nouveau_drm *drm = nouveau_drm(dev); 1668c2ecf20Sopenharmony_ci struct nouveau_channel *chan = drm->channel; 1678c2ecf20Sopenharmony_ci struct nvif_push *push = chan->chan.push; 1688c2ecf20Sopenharmony_ci int ret, format; 1698c2ecf20Sopenharmony_ci 1708c2ecf20Sopenharmony_ci ret = nvif_object_ctor(&chan->user, "fbconTwoD", 0x902d, 0x902d, 1718c2ecf20Sopenharmony_ci NULL, 0, &nfbdev->twod); 1728c2ecf20Sopenharmony_ci if (ret) 1738c2ecf20Sopenharmony_ci return ret; 1748c2ecf20Sopenharmony_ci 1758c2ecf20Sopenharmony_ci switch (info->var.bits_per_pixel) { 1768c2ecf20Sopenharmony_ci case 8: 1778c2ecf20Sopenharmony_ci format = NV902D_SET_DST_FORMAT_V_Y8; 1788c2ecf20Sopenharmony_ci break; 1798c2ecf20Sopenharmony_ci case 15: 1808c2ecf20Sopenharmony_ci format = NV902D_SET_DST_FORMAT_V_X1R5G5B5; 1818c2ecf20Sopenharmony_ci break; 1828c2ecf20Sopenharmony_ci case 16: 1838c2ecf20Sopenharmony_ci format = NV902D_SET_DST_FORMAT_V_R5G6B5; 1848c2ecf20Sopenharmony_ci break; 1858c2ecf20Sopenharmony_ci case 32: 1868c2ecf20Sopenharmony_ci switch (info->var.transp.length) { 1878c2ecf20Sopenharmony_ci case 0: /* depth 24 */ 1888c2ecf20Sopenharmony_ci case 8: /* depth 32, just use 24.. */ 1898c2ecf20Sopenharmony_ci format = NV902D_SET_DST_FORMAT_V_X8R8G8B8; 1908c2ecf20Sopenharmony_ci break; 1918c2ecf20Sopenharmony_ci case 2: /* depth 30 */ 1928c2ecf20Sopenharmony_ci format = NV902D_SET_DST_FORMAT_V_A2B10G10R10; 1938c2ecf20Sopenharmony_ci break; 1948c2ecf20Sopenharmony_ci default: 1958c2ecf20Sopenharmony_ci return -EINVAL; 1968c2ecf20Sopenharmony_ci } 1978c2ecf20Sopenharmony_ci break; 1988c2ecf20Sopenharmony_ci default: 1998c2ecf20Sopenharmony_ci return -EINVAL; 2008c2ecf20Sopenharmony_ci } 2018c2ecf20Sopenharmony_ci 2028c2ecf20Sopenharmony_ci ret = PUSH_WAIT(push, 52); 2038c2ecf20Sopenharmony_ci if (ret) { 2048c2ecf20Sopenharmony_ci WARN_ON(1); 2058c2ecf20Sopenharmony_ci nouveau_fbcon_gpu_lockup(info); 2068c2ecf20Sopenharmony_ci return ret; 2078c2ecf20Sopenharmony_ci } 2088c2ecf20Sopenharmony_ci 2098c2ecf20Sopenharmony_ci PUSH_MTHD(push, NV902D, SET_OBJECT, nfbdev->twod.handle); 2108c2ecf20Sopenharmony_ci 2118c2ecf20Sopenharmony_ci PUSH_MTHD(push, NV902D, SET_DST_FORMAT, 2128c2ecf20Sopenharmony_ci NVVAL(NV902D, SET_DST_FORMAT, V, format), 2138c2ecf20Sopenharmony_ci 2148c2ecf20Sopenharmony_ci SET_DST_MEMORY_LAYOUT, 2158c2ecf20Sopenharmony_ci NVDEF(NV902D, SET_DST_MEMORY_LAYOUT, V, PITCH)); 2168c2ecf20Sopenharmony_ci 2178c2ecf20Sopenharmony_ci PUSH_MTHD(push, NV902D, SET_DST_PITCH, info->fix.line_length, 2188c2ecf20Sopenharmony_ci SET_DST_WIDTH, info->var.xres_virtual, 2198c2ecf20Sopenharmony_ci SET_DST_HEIGHT, info->var.yres_virtual, 2208c2ecf20Sopenharmony_ci 2218c2ecf20Sopenharmony_ci SET_DST_OFFSET_UPPER, 2228c2ecf20Sopenharmony_ci NVVAL(NV902D, SET_DST_OFFSET_UPPER, V, upper_32_bits(nfbdev->vma->addr)), 2238c2ecf20Sopenharmony_ci 2248c2ecf20Sopenharmony_ci SET_DST_OFFSET_LOWER, 2258c2ecf20Sopenharmony_ci NVVAL(NV902D, SET_DST_OFFSET_LOWER, V, lower_32_bits(nfbdev->vma->addr))); 2268c2ecf20Sopenharmony_ci 2278c2ecf20Sopenharmony_ci PUSH_MTHD(push, NV902D, SET_SRC_FORMAT, 2288c2ecf20Sopenharmony_ci NVVAL(NV902D, SET_SRC_FORMAT, V, format), 2298c2ecf20Sopenharmony_ci 2308c2ecf20Sopenharmony_ci SET_SRC_MEMORY_LAYOUT, 2318c2ecf20Sopenharmony_ci NVDEF(NV902D, SET_SRC_MEMORY_LAYOUT, V, PITCH)); 2328c2ecf20Sopenharmony_ci 2338c2ecf20Sopenharmony_ci PUSH_MTHD(push, NV902D, SET_SRC_PITCH, info->fix.line_length, 2348c2ecf20Sopenharmony_ci SET_SRC_WIDTH, info->var.xres_virtual, 2358c2ecf20Sopenharmony_ci SET_SRC_HEIGHT, info->var.yres_virtual, 2368c2ecf20Sopenharmony_ci 2378c2ecf20Sopenharmony_ci SET_SRC_OFFSET_UPPER, 2388c2ecf20Sopenharmony_ci NVVAL(NV902D, SET_SRC_OFFSET_UPPER, V, upper_32_bits(nfbdev->vma->addr)), 2398c2ecf20Sopenharmony_ci 2408c2ecf20Sopenharmony_ci SET_SRC_OFFSET_LOWER, 2418c2ecf20Sopenharmony_ci NVVAL(NV902D, SET_SRC_OFFSET_LOWER, V, lower_32_bits(nfbdev->vma->addr))); 2428c2ecf20Sopenharmony_ci 2438c2ecf20Sopenharmony_ci PUSH_IMMD(push, NV902D, SET_CLIP_ENABLE, 2448c2ecf20Sopenharmony_ci NVDEF(NV902D, SET_CLIP_ENABLE, V, FALSE)); 2458c2ecf20Sopenharmony_ci 2468c2ecf20Sopenharmony_ci PUSH_IMMD(push, NV902D, SET_ROP, 2478c2ecf20Sopenharmony_ci NVVAL(NV902D, SET_ROP, V, 0x55)); 2488c2ecf20Sopenharmony_ci 2498c2ecf20Sopenharmony_ci PUSH_IMMD(push, NV902D, SET_OPERATION, 2508c2ecf20Sopenharmony_ci NVDEF(NV902D, SET_OPERATION, V, SRCCOPY)); 2518c2ecf20Sopenharmony_ci 2528c2ecf20Sopenharmony_ci PUSH_MTHD(push, NV902D, SET_MONOCHROME_PATTERN_COLOR_FORMAT, 2538c2ecf20Sopenharmony_ci NVDEF(NV902D, SET_MONOCHROME_PATTERN_COLOR_FORMAT, V, A8R8G8B8), 2548c2ecf20Sopenharmony_ci 2558c2ecf20Sopenharmony_ci SET_MONOCHROME_PATTERN_FORMAT, 2568c2ecf20Sopenharmony_ci NVDEF(NV902D, SET_MONOCHROME_PATTERN_FORMAT, V, LE_M1)); 2578c2ecf20Sopenharmony_ci 2588c2ecf20Sopenharmony_ci PUSH_MTHD(push, NV902D, RENDER_SOLID_PRIM_MODE, 2598c2ecf20Sopenharmony_ci NVDEF(NV902D, RENDER_SOLID_PRIM_MODE, V, RECTS), 2608c2ecf20Sopenharmony_ci 2618c2ecf20Sopenharmony_ci SET_RENDER_SOLID_PRIM_COLOR_FORMAT, 2628c2ecf20Sopenharmony_ci NVVAL(NV902D, SET_RENDER_SOLID_PRIM_COLOR_FORMAT, V, format)); 2638c2ecf20Sopenharmony_ci 2648c2ecf20Sopenharmony_ci PUSH_MTHD(push, NV902D, SET_PIXELS_FROM_CPU_DATA_TYPE, 2658c2ecf20Sopenharmony_ci NVDEF(NV902D, SET_PIXELS_FROM_CPU_DATA_TYPE, V, INDEX), 2668c2ecf20Sopenharmony_ci 2678c2ecf20Sopenharmony_ci SET_PIXELS_FROM_CPU_COLOR_FORMAT, 2688c2ecf20Sopenharmony_ci NVVAL(NV902D, SET_PIXELS_FROM_CPU_COLOR_FORMAT, V, format), 2698c2ecf20Sopenharmony_ci 2708c2ecf20Sopenharmony_ci SET_PIXELS_FROM_CPU_INDEX_FORMAT, 2718c2ecf20Sopenharmony_ci NVDEF(NV902D, SET_PIXELS_FROM_CPU_INDEX_FORMAT, V, I1), 2728c2ecf20Sopenharmony_ci 2738c2ecf20Sopenharmony_ci SET_PIXELS_FROM_CPU_MONO_FORMAT, 2748c2ecf20Sopenharmony_ci NVDEF(NV902D, SET_PIXELS_FROM_CPU_MONO_FORMAT, V, CGA6_M1), 2758c2ecf20Sopenharmony_ci 2768c2ecf20Sopenharmony_ci SET_PIXELS_FROM_CPU_WRAP, 2778c2ecf20Sopenharmony_ci NVDEF(NV902D, SET_PIXELS_FROM_CPU_WRAP, V, WRAP_BYTE)); 2788c2ecf20Sopenharmony_ci 2798c2ecf20Sopenharmony_ci PUSH_IMMD(push, NV902D, SET_PIXELS_FROM_CPU_MONO_OPACITY, 2808c2ecf20Sopenharmony_ci NVDEF(NV902D, SET_PIXELS_FROM_CPU_MONO_OPACITY, V, OPAQUE)); 2818c2ecf20Sopenharmony_ci 2828c2ecf20Sopenharmony_ci PUSH_MTHD(push, NV902D, SET_PIXELS_FROM_CPU_DX_DU_FRAC, 0, 2838c2ecf20Sopenharmony_ci SET_PIXELS_FROM_CPU_DX_DU_INT, 1, 2848c2ecf20Sopenharmony_ci SET_PIXELS_FROM_CPU_DY_DV_FRAC, 0, 2858c2ecf20Sopenharmony_ci SET_PIXELS_FROM_CPU_DY_DV_INT, 1); 2868c2ecf20Sopenharmony_ci 2878c2ecf20Sopenharmony_ci PUSH_IMMD(push, NV902D, SET_PIXELS_FROM_MEMORY_SAFE_OVERLAP, 2888c2ecf20Sopenharmony_ci NVDEF(NV902D, SET_PIXELS_FROM_MEMORY_SAFE_OVERLAP, V, TRUE)); 2898c2ecf20Sopenharmony_ci 2908c2ecf20Sopenharmony_ci PUSH_MTHD(push, NV902D, SET_PIXELS_FROM_MEMORY_DU_DX_FRAC, 0, 2918c2ecf20Sopenharmony_ci SET_PIXELS_FROM_MEMORY_DU_DX_INT, 1, 2928c2ecf20Sopenharmony_ci SET_PIXELS_FROM_MEMORY_DV_DY_FRAC, 0, 2938c2ecf20Sopenharmony_ci SET_PIXELS_FROM_MEMORY_DV_DY_INT, 1); 2948c2ecf20Sopenharmony_ci PUSH_KICK(push); 2958c2ecf20Sopenharmony_ci return 0; 2968c2ecf20Sopenharmony_ci} 2978c2ecf20Sopenharmony_ci 298