base907c.c (66f7b7bddfe60a708c7711e47c95d20db05e2110) base907c.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

--- 20 unchanged lines hidden (view full) ---

29base907c_image_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw)
30{
31 struct nvif_push *push = wndw->wndw.push;
32 int ret;
33
34 if ((ret = PUSH_WAIT(push, 10)))
35 return ret;
36
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

--- 20 unchanged lines hidden (view full) ---

29base907c_image_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw)
30{
31 struct nvif_push *push = wndw->wndw.push;
32 int ret;
33
34 if ((ret = PUSH_WAIT(push, 10)))
35 return ret;
36
37 PUSH_NVSQ(push, NV907C, 0x0084, asyw->image.mode << 8 |
38 asyw->image.interval << 4);
39 PUSH_NVSQ(push, NV907C, 0x00c0, asyw->image.handle[0]);
40 PUSH_NVSQ(push, NV907C, 0x0400, asyw->image.offset[0] >> 8,
41 0x0404, 0x00000000,
42 0x0408, asyw->image.h << 16 | asyw->image.w,
43 0x040c, asyw->image.layout << 24 |
44 (asyw->image.pitch[0] >> 8) << 8 |
45 asyw->image.blocks[0] << 8 |
46 asyw->image.blockh,
47 0x0410, asyw->image.format << 8);
37 PUSH_MTHD(push, NV907C, SET_PRESENT_CONTROL,
38 NVVAL(NV907C, SET_PRESENT_CONTROL, BEGIN_MODE, asyw->image.mode) |
39 NVDEF(NV907C, SET_PRESENT_CONTROL, TIMESTAMP_MODE, DISABLE) |
40 NVVAL(NV907C, SET_PRESENT_CONTROL, MIN_PRESENT_INTERVAL, asyw->image.interval));
41
42 PUSH_MTHD(push, NV907C, SET_CONTEXT_DMAS_ISO(0), asyw->image.handle, 1);
43
44 PUSH_MTHD(push, NV907C, SURFACE_SET_OFFSET(0, 0), asyw->image.offset[0] >> 8,
45 SURFACE_SET_OFFSET(0, 1), 0x00000000,
46
47 SURFACE_SET_SIZE(0),
48 NVVAL(NV907C, SURFACE_SET_SIZE, WIDTH, asyw->image.w) |
49 NVVAL(NV907C, SURFACE_SET_SIZE, HEIGHT, asyw->image.h),
50
51 SURFACE_SET_STORAGE(0),
52 NVVAL(NV907C, SURFACE_SET_STORAGE, BLOCK_HEIGHT, asyw->image.blockh) |
53 NVVAL(NV907C, SURFACE_SET_STORAGE, PITCH, asyw->image.pitch[0] >> 8) |
54 NVVAL(NV907C, SURFACE_SET_STORAGE, PITCH, asyw->image.blocks[0]) |
55 NVVAL(NV907C, SURFACE_SET_STORAGE, MEMORY_LAYOUT, asyw->image.layout),
56
57 SURFACE_SET_PARAMS(0),
58 NVVAL(NV907C, SURFACE_SET_PARAMS, FORMAT, asyw->image.format) |
59 NVDEF(NV907C, SURFACE_SET_PARAMS, SUPER_SAMPLE, X1_AA) |
60 NVDEF(NV907C, SURFACE_SET_PARAMS, GAMMA, LINEAR) |
61 NVDEF(NV907C, SURFACE_SET_PARAMS, LAYOUT, FRM));
48 return 0;
49}
50
51static int
52base907c_xlut_clr(struct nv50_wndw *wndw)
53{
54 struct nvif_push *push = wndw->wndw.push;
55 int ret;

--- 151 unchanged lines hidden ---
62 return 0;
63}
64
65static int
66base907c_xlut_clr(struct nv50_wndw *wndw)
67{
68 struct nvif_push *push = wndw->wndw.push;
69 int ret;

--- 151 unchanged lines hidden ---