base507c.c (66f7b7bddfe60a708c7711e47c95d20db05e2110) | base507c.c (f844eb485eb056ad3b67e49f95cbc6c685a73db4) |
---|---|
1/* 2 * Copyright 2018 Red Hat Inc. 3 * 4 * Permission is hereby granted, free of charge, to any person obtaining a 5 * copy of this software and associated documentation files (the "Software"), 6 * to deal in the Software without restriction, including without limitation 7 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 * and/or sell copies of the Software, and to permit persons to whom the --- 56 unchanged lines hidden (view full) --- 65base507c_image_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw) 66{ 67 struct nvif_push *push = wndw->wndw.push; 68 int ret; 69 70 if ((ret = PUSH_WAIT(push, 13))) 71 return ret; 72 | 1/* 2 * Copyright 2018 Red Hat Inc. 3 * 4 * Permission is hereby granted, free of charge, to any person obtaining a 5 * copy of this software and associated documentation files (the "Software"), 6 * to deal in the Software without restriction, including without limitation 7 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 * and/or sell copies of the Software, and to permit persons to whom the --- 56 unchanged lines hidden (view full) --- 65base507c_image_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw) 66{ 67 struct nvif_push *push = wndw->wndw.push; 68 int ret; 69 70 if ((ret = PUSH_WAIT(push, 13))) 71 return ret; 72 |
73 PUSH_NVSQ(push, NV507C, 0x0084, asyw->image.mode << 8 | 74 asyw->image.interval << 4); 75 PUSH_NVSQ(push, NV507C, 0x00c0, asyw->image.handle[0]); 76 if (asyw->image.format == 0xca) { 77 PUSH_NVSQ(push, NV507C, 0x0110, 1, 78 0x0114, 0x6400); | 73 PUSH_MTHD(push, NV507C, SET_PRESENT_CONTROL, 74 NVVAL(NV507C, SET_PRESENT_CONTROL, BEGIN_MODE, asyw->image.mode) | 75 NVVAL(NV507C, SET_PRESENT_CONTROL, MIN_PRESENT_INTERVAL, asyw->image.interval)); 76 77 PUSH_MTHD(push, NV507C, SET_CONTEXT_DMA_ISO, asyw->image.handle[0]); 78 79 if (asyw->image.format == NV507C_SURFACE_SET_PARAMS_FORMAT_RF16_GF16_BF16_AF16) { 80 PUSH_MTHD(push, NV507C, SET_PROCESSING, 81 NVDEF(NV507C, SET_PROCESSING, USE_GAIN_OFS, ENABLE), 82 83 SET_CONVERSION, 84 NVVAL(NV507C, SET_CONVERSION, GAIN, 0) | 85 NVVAL(NV507C, SET_CONVERSION, OFS, 0x64)); |
79 } else { | 86 } else { |
80 PUSH_NVSQ(push, NV507C, 0x0110, 0, 81 0x0114, 0); | 87 PUSH_MTHD(push, NV507C, SET_PROCESSING, 88 NVDEF(NV507C, SET_PROCESSING, USE_GAIN_OFS, DISABLE)); |
82 } | 89 } |
83 PUSH_NVSQ(push, NV507C, 0x0800, asyw->image.offset[0] >> 8, 84 0x0804, 0x00000000, 85 0x0808, asyw->image.h << 16 | asyw->image.w, 86 0x080c, asyw->image.layout << 20 | 87 (asyw->image.pitch[0] >> 8) << 8 | 88 asyw->image.blocks[0] << 8 | 89 asyw->image.blockh, 90 0x0810, asyw->image.kind << 16 | 91 asyw->image.format << 8); | 90 91 PUSH_MTHD(push, NV507C, SURFACE_SET_OFFSET(0, 0), asyw->image.offset[0] >> 8); 92 93 PUSH_MTHD(push, NV507C, SURFACE_SET_SIZE(0), 94 NVVAL(NV507C, SURFACE_SET_SIZE, WIDTH, asyw->image.w) | 95 NVVAL(NV507C, SURFACE_SET_SIZE, HEIGHT, asyw->image.h), 96 97 SURFACE_SET_STORAGE(0), 98 NVVAL(NV507C, SURFACE_SET_STORAGE, MEMORY_LAYOUT, asyw->image.layout) | 99 NVVAL(NV507C, SURFACE_SET_STORAGE, PITCH, asyw->image.pitch[0] >> 8) | 100 NVVAL(NV507C, SURFACE_SET_STORAGE, PITCH, asyw->image.blocks[0]) | 101 NVVAL(NV507C, SURFACE_SET_STORAGE, BLOCK_HEIGHT, asyw->image.blockh), 102 103 SURFACE_SET_PARAMS(0), 104 NVVAL(NV507C, SURFACE_SET_PARAMS, FORMAT, asyw->image.format) | 105 NVDEF(NV507C, SURFACE_SET_PARAMS, SUPER_SAMPLE, X1_AA) | 106 NVDEF(NV507C, SURFACE_SET_PARAMS, GAMMA, LINEAR) | 107 NVDEF(NV507C, SURFACE_SET_PARAMS, LAYOUT, FRM) | 108 NVVAL(NV507C, SURFACE_SET_PARAMS, KIND, asyw->image.kind) | 109 NVDEF(NV507C, SURFACE_SET_PARAMS, PART_STRIDE, PARTSTRIDE_256)); |
92 return 0; 93} 94 95int 96base507c_xlut_clr(struct nv50_wndw *wndw) 97{ 98 struct nvif_push *push = wndw->wndw.push; 99 int ret; --- 229 unchanged lines hidden --- | 110 return 0; 111} 112 113int 114base507c_xlut_clr(struct nv50_wndw *wndw) 115{ 116 struct nvif_push *push = wndw->wndw.push; 117 int ret; --- 229 unchanged lines hidden --- |