head827d.c (1302634f793110fc272f9de4568164737c2539cd) head827d.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

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

46{
47 struct nvif_push *push = nv50_disp(head->base.base.dev)->core->chan.push;
48 const int i = head->base.index;
49 int ret;
50
51 if ((ret = PUSH_WAIT(push, 5)))
52 return ret;
53
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

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

46{
47 struct nvif_push *push = nv50_disp(head->base.base.dev)->core->chan.push;
48 const int i = head->base.index;
49 int ret;
50
51 if ((ret = PUSH_WAIT(push, 5)))
52 return ret;
53
54 PUSH_NVSQ(push, NV827D, 0x0880 + (i * 0x400), 0x80000000 |
55 asyh->curs.layout << 26 |
56 asyh->curs.format << 24,
57 0x0884 + (i * 0x400), asyh->curs.offset >> 8);
58 PUSH_NVSQ(push, NV827D, 0x089c + (i * 0x400), asyh->curs.handle);
54 PUSH_MTHD(push, NV827D, HEAD_SET_CONTROL_CURSOR(i),
55 NVDEF(NV827D, HEAD_SET_CONTROL_CURSOR, ENABLE, ENABLE) |
56 NVVAL(NV827D, HEAD_SET_CONTROL_CURSOR, FORMAT, asyh->curs.format) |
57 NVVAL(NV827D, HEAD_SET_CONTROL_CURSOR, SIZE, asyh->curs.layout) |
58 NVVAL(NV827D, HEAD_SET_CONTROL_CURSOR, HOT_SPOT_X, 0) |
59 NVVAL(NV827D, HEAD_SET_CONTROL_CURSOR, HOT_SPOT_Y, 0) |
60 NVDEF(NV827D, HEAD_SET_CONTROL_CURSOR, COMPOSITION, ALPHA_BLEND) |
61 NVDEF(NV827D, HEAD_SET_CONTROL_CURSOR, SUB_OWNER, NONE),
62
63 HEAD_SET_OFFSET_CURSOR(i), asyh->curs.offset >> 8);
64
65 PUSH_MTHD(push, NV827D, HEAD_SET_CONTEXT_DMA_CURSOR(i), asyh->curs.handle);
59 return 0;
60}
61
62static int
63head827d_core_set(struct nv50_head *head, struct nv50_head_atom *asyh)
64{
65 struct nvif_push *push = nv50_disp(head->base.base.dev)->core->chan.push;
66 const int i = head->base.index;

--- 91 unchanged lines hidden ---
66 return 0;
67}
68
69static int
70head827d_core_set(struct nv50_head *head, struct nv50_head_atom *asyh)
71{
72 struct nvif_push *push = nv50_disp(head->base.base.dev)->core->chan.push;
73 const int i = head->base.index;

--- 91 unchanged lines hidden ---