head907d.c (c74a7469f97c0f40b46e82ee979f9fb1bb6e847c) | head907d.c (cb55cd0c66a16fd965a44e2634755b060dc64bd7) |
---|---|
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 --- 200 unchanged lines hidden (view full) --- 209 evo_data(push, asyh->olut.offset >> 8); 210 evo_mthd(push, 0x045c + (head->base.index * 0x300), 1); 211 evo_data(push, asyh->olut.handle); 212 evo_kick(push, core); 213 } 214} 215 216void | 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 --- 200 unchanged lines hidden (view full) --- 209 evo_data(push, asyh->olut.offset >> 8); 210 evo_mthd(push, 0x045c + (head->base.index * 0x300), 1); 211 evo_data(push, asyh->olut.handle); 212 evo_kick(push, core); 213 } 214} 215 216void |
217head907d_olut_load(struct drm_color_lut *in, int size, void __iomem *mem) 218{ 219 for (; size--; in++, mem += 8) { 220 writew(drm_color_lut_extract(in-> red, 14) + 0x6000, mem + 0); 221 writew(drm_color_lut_extract(in->green, 14) + 0x6000, mem + 2); 222 writew(drm_color_lut_extract(in-> blue, 14) + 0x6000, mem + 4); 223 } 224 225 /* INTERPOLATE modes require a "next" entry to interpolate with, 226 * so we replicate the last entry to deal with this for now. 227 */ 228 writew(readw(mem - 8), mem + 0); 229 writew(readw(mem - 6), mem + 2); 230 writew(readw(mem - 4), mem + 4); 231} 232 233void |
|
217head907d_olut(struct nv50_head *head, struct nv50_head_atom *asyh) 218{ 219 asyh->olut.mode = 7; | 234head907d_olut(struct nv50_head *head, struct nv50_head_atom *asyh) 235{ 236 asyh->olut.mode = 7; |
237 asyh->olut.load = head907d_olut_load; |
|
220} 221 222void 223head907d_mode(struct nv50_head *head, struct nv50_head_atom *asyh) 224{ 225 struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan; 226 struct nv50_head_mode *m = &asyh->mode; 227 u32 *push; --- 57 unchanged lines hidden --- | 238} 239 240void 241head907d_mode(struct nv50_head *head, struct nv50_head_atom *asyh) 242{ 243 struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan; 244 struct nv50_head_mode *m = &asyh->mode; 245 u32 *push; --- 57 unchanged lines hidden --- |