head917d.c (ed0b86a90bf91d0c41f6b373befd2ce98658b49e) | head917d.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 --- 38 unchanged lines hidden (view full) --- 47{ 48 struct nvif_push *push = nv50_disp(head->base.base.dev)->core->chan.push; 49 const int i = head->base.index; 50 u32 bounds = 0; 51 int ret; 52 53 if (asyh->base.cpp) { 54 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 --- 38 unchanged lines hidden (view full) --- 47{ 48 struct nvif_push *push = nv50_disp(head->base.base.dev)->core->chan.push; 49 const int i = head->base.index; 50 u32 bounds = 0; 51 int ret; 52 53 if (asyh->base.cpp) { 54 switch (asyh->base.cpp) { |
55 case 8: bounds |= 0x00000500; break; 56 case 4: bounds |= 0x00000300; break; 57 case 2: bounds |= 0x00000100; break; 58 case 1: bounds |= 0x00000000; break; | 55 case 8: bounds |= NVDEF(NV917D, HEAD_SET_BASE_CHANNEL_USAGE_BOUNDS, PIXEL_DEPTH, BPP_64); break; 56 case 4: bounds |= NVDEF(NV917D, HEAD_SET_BASE_CHANNEL_USAGE_BOUNDS, PIXEL_DEPTH, BPP_32); break; 57 case 2: bounds |= NVDEF(NV917D, HEAD_SET_BASE_CHANNEL_USAGE_BOUNDS, PIXEL_DEPTH, BPP_16); break; 58 case 1: bounds |= NVDEF(NV917D, HEAD_SET_BASE_CHANNEL_USAGE_BOUNDS, PIXEL_DEPTH, BPP_8); break; |
59 default: 60 WARN_ON(1); 61 break; 62 } | 59 default: 60 WARN_ON(1); 61 break; 62 } |
63 bounds |= 0x00020001; | 63 bounds |= NVDEF(NV917D, HEAD_SET_BASE_CHANNEL_USAGE_BOUNDS, USABLE, TRUE); 64 bounds |= NVDEF(NV917D, HEAD_SET_BASE_CHANNEL_USAGE_BOUNDS, BASE_LUT, USAGE_1025); |
64 } 65 66 if ((ret = PUSH_WAIT(push, 2))) 67 return ret; 68 | 65 } 66 67 if ((ret = PUSH_WAIT(push, 2))) 68 return ret; 69 |
69 PUSH_NVSQ(push, NV917D, 0x04d0 + (i * 0x300), bounds); | 70 PUSH_MTHD(push, NV917D, HEAD_SET_BASE_CHANNEL_USAGE_BOUNDS(i), bounds); |
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) { --- 31 unchanged lines hidden --- | 71 return 0; 72} 73 74int 75head917d_curs_layout(struct nv50_head *head, struct nv50_wndw_atom *asyw, 76 struct nv50_head_atom *asyh) 77{ 78 switch (asyw->state.fb->width) { --- 31 unchanged lines hidden --- |