head507d.c (916722fce5a25a1ffefac616f8f0213de9ce0353) head507d.c (2aa934ca04bc93e7cf5133cb44a751be13b9df9e)
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

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

90{
91 struct nvif_push *push = nv50_disp(head->base.base.dev)->core->chan.push;
92 const int i = head->base.index;
93 u32 bounds = 0;
94 int ret;
95
96 if (asyh->base.cpp) {
97 switch (asyh->base.cpp) {
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

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

90{
91 struct nvif_push *push = nv50_disp(head->base.base.dev)->core->chan.push;
92 const int i = head->base.index;
93 u32 bounds = 0;
94 int ret;
95
96 if (asyh->base.cpp) {
97 switch (asyh->base.cpp) {
98 case 8: bounds |= 0x00000500; break;
99 case 4: bounds |= 0x00000300; break;
100 case 2: bounds |= 0x00000100; break;
101 case 1: bounds |= 0x00000000; break;
98 case 8: bounds |= NVDEF(NV507D, HEAD_SET_BASE_CHANNEL_USAGE_BOUNDS, PIXEL_DEPTH, BPP_64); break;
99 case 4: bounds |= NVDEF(NV507D, HEAD_SET_BASE_CHANNEL_USAGE_BOUNDS, PIXEL_DEPTH, BPP_32); break;
100 case 2: bounds |= NVDEF(NV507D, HEAD_SET_BASE_CHANNEL_USAGE_BOUNDS, PIXEL_DEPTH, BPP_16); break;
101 case 1: bounds |= NVDEF(NV507D, HEAD_SET_BASE_CHANNEL_USAGE_BOUNDS, PIXEL_DEPTH, BPP_8); break;
102 default:
103 WARN_ON(1);
104 break;
105 }
102 default:
103 WARN_ON(1);
104 break;
105 }
106 bounds |= 0x00000001;
106 bounds |= NVDEF(NV507D, HEAD_SET_BASE_CHANNEL_USAGE_BOUNDS, USABLE, TRUE);
107 }
108
109 if ((ret = PUSH_WAIT(push, 2)))
110 return ret;
111
107 }
108
109 if ((ret = PUSH_WAIT(push, 2)))
110 return ret;
111
112 PUSH_NVSQ(push, NV507D, 0x0900 + (i * 0x400), bounds);
112 PUSH_MTHD(push, NV507D, HEAD_SET_BASE_CHANNEL_USAGE_BOUNDS(i), bounds);
113 return 0;
114}
115
116static int
117head507d_curs_clr(struct nv50_head *head)
118{
119 struct nvif_push *push = nv50_disp(head->base.base.dev)->core->chan.push;
120 const int i = head->base.index;

--- 323 unchanged lines hidden ---
113 return 0;
114}
115
116static int
117head507d_curs_clr(struct nv50_head *head)
118{
119 struct nvif_push *push = nv50_disp(head->base.base.dev)->core->chan.push;
120 const int i = head->base.index;

--- 323 unchanged lines hidden ---