wndwc37e.c (34838908f62a0160d2c12c12be6c3be910d17b85) wndwc37e.c (6d6e11e2844015a5f6c3d0373966fd4a459add8b)
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

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

120 evo_mthd(push, 0x0308, 1);
121 evo_data(push, 0x00000000);
122 evo_mthd(push, 0x0240, 1);
123 evo_data(push, 0x00000000);
124 evo_kick(push, &wndw->wndw);
125 }
126}
127
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

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

120 evo_mthd(push, 0x0308, 1);
121 evo_data(push, 0x00000000);
122 evo_mthd(push, 0x0240, 1);
123 evo_data(push, 0x00000000);
124 evo_kick(push, &wndw->wndw);
125 }
126}
127
128static void
128static int
129wndwc37e_image_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw)
130{
129wndwc37e_image_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw)
130{
131 u32 *push;
131 struct nvif_push *push = wndw->wndw.push;
132 int ret;
132
133
133 if (!(push = evo_wait(&wndw->wndw, 17)))
134 return;
134 if ((ret = PUSH_WAIT(push, 17)))
135 return ret;
135
136
136 evo_mthd(push, 0x0308, 1);
137 evo_data(push, asyw->image.mode << 4 | asyw->image.interval);
138 evo_mthd(push, 0x0224, 4);
139 evo_data(push, asyw->image.h << 16 | asyw->image.w);
140 evo_data(push, asyw->image.layout << 4 | asyw->image.blockh);
141 evo_data(push, asyw->csc.valid << 17 |
142 asyw->image.colorspace << 8 |
143 asyw->image.format);
144 evo_data(push, asyw->image.blocks[0] | (asyw->image.pitch[0] >> 6));
145 evo_mthd(push, 0x0240, 1);
146 evo_data(push, asyw->image.handle[0]);
147 evo_mthd(push, 0x0260, 1);
148 evo_data(push, asyw->image.offset[0] >> 8);
149 evo_mthd(push, 0x0290, 1);
150 evo_data(push, (asyw->state.src_y >> 16) << 16 |
151 (asyw->state.src_x >> 16));
152 evo_mthd(push, 0x0298, 1);
153 evo_data(push, (asyw->state.src_h >> 16) << 16 |
154 (asyw->state.src_w >> 16));
155 evo_mthd(push, 0x02a4, 1);
156 evo_data(push, asyw->state.crtc_h << 16 |
157 asyw->state.crtc_w);
158 evo_kick(push, &wndw->wndw);
137 PUSH_NVSQ(push, NVC37E, 0x0308, asyw->image.mode << 4 |
138 asyw->image.interval);
139 PUSH_NVSQ(push, NVC37E, 0x0224, asyw->image.h << 16 | asyw->image.w,
140 0x0228, asyw->image.layout << 4 |
141 asyw->image.blockh,
142 0x022c, asyw->csc.valid << 17 |
143 asyw->image.colorspace << 8 |
144 asyw->image.format,
145 0x0230, asyw->image.blocks[0] |
146 (asyw->image.pitch[0] >> 6));
147 PUSH_NVSQ(push, NVC37E, 0x0240, asyw->image.handle[0]);
148 PUSH_NVSQ(push, NVC37E, 0x0260, asyw->image.offset[0] >> 8);
149 PUSH_NVSQ(push, NVC37E, 0x0290,(asyw->state.src_y >> 16) << 16 |
150 (asyw->state.src_x >> 16));
151 PUSH_NVSQ(push, NVC37E, 0x0298,(asyw->state.src_h >> 16) << 16 |
152 (asyw->state.src_w >> 16));
153 PUSH_NVSQ(push, NVC37E, 0x02a4, asyw->state.crtc_h << 16 |
154 asyw->state.crtc_w);
155 return 0;
159}
160
161int
162wndwc37e_ntfy_clr(struct nv50_wndw *wndw)
163{
164 struct nvif_push *push = wndw->wndw.push;
165 int ret;
166

--- 169 unchanged lines hidden ---
156}
157
158int
159wndwc37e_ntfy_clr(struct nv50_wndw *wndw)
160{
161 struct nvif_push *push = wndw->wndw.push;
162 int ret;
163

--- 169 unchanged lines hidden ---