head917d.c (2f819f2be061c984005020f8dc45aee1e6af19a4) head917d.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

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

19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 * OTHER DEALINGS IN THE SOFTWARE.
21 */
22#include "head.h"
23#include "core.h"
24
25#include <nvif/push507c.h>
26
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

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

19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 * OTHER DEALINGS IN THE SOFTWARE.
21 */
22#include "head.h"
23#include "core.h"
24
25#include <nvif/push507c.h>
26
27#include <nvhw/class/cl917d.h>
28
27static int
28head917d_dither(struct nv50_head *head, struct nv50_head_atom *asyh)
29{
30 struct nvif_push *push = nv50_disp(head->base.base.dev)->core->chan.push;
31 const int i = head->base.index;
32 int ret;
33
34 if ((ret = PUSH_WAIT(push, 2)))

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

68 return 0;
69}
70
71int
72head917d_curs_layout(struct nv50_head *head, struct nv50_wndw_atom *asyw,
73 struct nv50_head_atom *asyh)
74{
75 switch (asyw->state.fb->width) {
29static int
30head917d_dither(struct nv50_head *head, struct nv50_head_atom *asyh)
31{
32 struct nvif_push *push = nv50_disp(head->base.base.dev)->core->chan.push;
33 const int i = head->base.index;
34 int ret;
35
36 if ((ret = PUSH_WAIT(push, 2)))

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

70 return 0;
71}
72
73int
74head917d_curs_layout(struct nv50_head *head, struct nv50_wndw_atom *asyw,
75 struct nv50_head_atom *asyh)
76{
77 switch (asyw->state.fb->width) {
76 case 32: asyh->curs.layout = 0; break;
77 case 64: asyh->curs.layout = 1; break;
78 case 128: asyh->curs.layout = 2; break;
79 case 256: asyh->curs.layout = 3; break;
78 case 32: asyh->curs.layout = NV917D_HEAD_SET_CONTROL_CURSOR_SIZE_W32_H32; break;
79 case 64: asyh->curs.layout = NV917D_HEAD_SET_CONTROL_CURSOR_SIZE_W64_H64; break;
80 case 128: asyh->curs.layout = NV917D_HEAD_SET_CONTROL_CURSOR_SIZE_W128_H128; break;
81 case 256: asyh->curs.layout = NV917D_HEAD_SET_CONTROL_CURSOR_SIZE_W256_H256; break;
80 default:
81 return -EINVAL;
82 }
83 return 0;
84}
85
86const struct nv50_head_func
87head917d = {

--- 19 unchanged lines hidden ---
82 default:
83 return -EINVAL;
84 }
85 return 0;
86}
87
88const struct nv50_head_func
89head917d = {

--- 19 unchanged lines hidden ---