headc37d.c (a66a096d784843f6d4c8e4c0b028524baf747f4c) headc37d.c (ed0b86a90bf91d0c41f6b373befd2ce98658b49e)
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

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

111{
112 struct nvif_push *push = nv50_disp(head->base.base.dev)->core->chan.push;
113 const int i = head->base.index;
114 int ret;
115
116 if ((ret = PUSH_WAIT(push, 7)))
117 return ret;
118
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

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

111{
112 struct nvif_push *push = nv50_disp(head->base.base.dev)->core->chan.push;
113 const int i = head->base.index;
114 int ret;
115
116 if ((ret = PUSH_WAIT(push, 7)))
117 return ret;
118
119 PUSH_NVSQ(push, NVC37D, 0x209c + (i * 0x400), 0x80000000 |
120 asyh->curs.layout << 8 |
121 asyh->curs.format << 0,
122 0x20a0 + (i * 0x400), 0x000072ff);
123 PUSH_NVSQ(push, NVC37D, 0x2088 + (i * 0x400), asyh->curs.handle);
124 PUSH_NVSQ(push, NVC37D, 0x2090 + (i * 0x400), asyh->curs.offset >> 8);
119 PUSH_MTHD(push, NVC37D, HEAD_SET_CONTROL_CURSOR(i),
120 NVDEF(NVC37D, HEAD_SET_CONTROL_CURSOR, ENABLE, ENABLE) |
121 NVVAL(NVC37D, HEAD_SET_CONTROL_CURSOR, FORMAT, asyh->curs.format) |
122 NVVAL(NVC37D, HEAD_SET_CONTROL_CURSOR, SIZE, asyh->curs.layout) |
123 NVVAL(NVC37D, HEAD_SET_CONTROL_CURSOR, HOT_SPOT_X, 0) |
124 NVVAL(NVC37D, HEAD_SET_CONTROL_CURSOR, HOT_SPOT_Y, 0) |
125 NVDEF(NVC37D, HEAD_SET_CONTROL_CURSOR, DE_GAMMA, NONE),
126
127 HEAD_SET_CONTROL_CURSOR_COMPOSITION(i),
128 NVVAL(NVC37D, HEAD_SET_CONTROL_CURSOR_COMPOSITION, K1, 0xff) |
129 NVDEF(NVC37D, HEAD_SET_CONTROL_CURSOR_COMPOSITION, CURSOR_COLOR_FACTOR_SELECT,
130 K1) |
131 NVDEF(NVC37D, HEAD_SET_CONTROL_CURSOR_COMPOSITION, VIEWPORT_COLOR_FACTOR_SELECT,
132 NEG_K1_TIMES_SRC) |
133 NVDEF(NVC37D, HEAD_SET_CONTROL_CURSOR_COMPOSITION, MODE, BLEND));
134
135 PUSH_MTHD(push, NVC37D, HEAD_SET_CONTEXT_DMA_CURSOR(i, 0), asyh->curs.handle);
136 PUSH_MTHD(push, NVC37D, HEAD_SET_OFFSET_CURSOR(i, 0), asyh->curs.offset >> 8);
125 return 0;
126}
127
128int
129headc37d_curs_format(struct nv50_head *head, struct nv50_wndw_atom *asyw,
130 struct nv50_head_atom *asyh)
131{
132 asyh->curs.format = asyw->image.format;

--- 142 unchanged lines hidden ---
137 return 0;
138}
139
140int
141headc37d_curs_format(struct nv50_head *head, struct nv50_wndw_atom *asyw,
142 struct nv50_head_atom *asyh)
143{
144 asyh->curs.format = asyw->image.format;

--- 142 unchanged lines hidden ---