head907d.c (916722fce5a25a1ffefac616f8f0213de9ce0353) | head907d.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 --- 109 unchanged lines hidden (view full) --- 118{ 119 struct nvif_push *push = nv50_disp(head->base.base.dev)->core->chan.push; 120 const int i = head->base.index; 121 u32 bounds = 0; 122 int ret; 123 124 if (asyh->base.cpp) { 125 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 --- 109 unchanged lines hidden (view full) --- 118{ 119 struct nvif_push *push = nv50_disp(head->base.base.dev)->core->chan.push; 120 const int i = head->base.index; 121 u32 bounds = 0; 122 int ret; 123 124 if (asyh->base.cpp) { 125 switch (asyh->base.cpp) { |
126 case 8: bounds |= 0x00000500; break; 127 case 4: bounds |= 0x00000300; break; 128 case 2: bounds |= 0x00000100; break; 129 case 1: bounds |= 0x00000000; break; | 126 case 8: bounds |= NVDEF(NV907D, HEAD_SET_BASE_CHANNEL_USAGE_BOUNDS, PIXEL_DEPTH, BPP_64); break; 127 case 4: bounds |= NVDEF(NV907D, HEAD_SET_BASE_CHANNEL_USAGE_BOUNDS, PIXEL_DEPTH, BPP_32); break; 128 case 2: bounds |= NVDEF(NV907D, HEAD_SET_BASE_CHANNEL_USAGE_BOUNDS, PIXEL_DEPTH, BPP_16); break; 129 case 1: bounds |= NVDEF(NV907D, HEAD_SET_BASE_CHANNEL_USAGE_BOUNDS, PIXEL_DEPTH, BPP_8); break; |
130 default: 131 WARN_ON(1); 132 break; 133 } | 130 default: 131 WARN_ON(1); 132 break; 133 } |
134 bounds |= 0x00000001; | 134 bounds |= NVDEF(NV907D, HEAD_SET_BASE_CHANNEL_USAGE_BOUNDS, USABLE, TRUE); |
135 } 136 137 if ((ret = PUSH_WAIT(push, 2))) 138 return ret; 139 | 135 } 136 137 if ((ret = PUSH_WAIT(push, 2))) 138 return ret; 139 |
140 PUSH_NVSQ(push, NV907D, 0x04d0 + (i * 0x300), bounds); | 140 PUSH_MTHD(push, NV907D, HEAD_SET_BASE_CHANNEL_USAGE_BOUNDS(i), bounds); |
141 return 0; 142} 143 144int 145head907d_curs_clr(struct nv50_head *head) 146{ 147 struct nvif_push *push = nv50_disp(head->base.base.dev)->core->chan.push; 148 const int i = head->base.index; --- 278 unchanged lines hidden --- | 141 return 0; 142} 143 144int 145head907d_curs_clr(struct nv50_head *head) 146{ 147 struct nvif_push *push = nv50_disp(head->base.base.dev)->core->chan.push; 148 const int i = head->base.index; --- 278 unchanged lines hidden --- |