head507d.c (c74a7469f97c0f40b46e82ee979f9fb1bb6e847c) | head507d.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 --- 240 unchanged lines hidden (view full) --- 249 if ((push = evo_wait(core, 3))) { 250 evo_mthd(push, 0x0840 + (head->base.index * 0x400), 2); 251 evo_data(push, 0x80000000 | asyh->olut.mode << 30); 252 evo_data(push, asyh->olut.offset >> 8); 253 evo_kick(push, core); 254 } 255} 256 | 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 --- 240 unchanged lines hidden (view full) --- 249 if ((push = evo_wait(core, 3))) { 250 evo_mthd(push, 0x0840 + (head->base.index * 0x400), 2); 251 evo_data(push, 0x80000000 | asyh->olut.mode << 30); 252 evo_data(push, asyh->olut.offset >> 8); 253 evo_kick(push, core); 254 } 255} 256 |
257static void 258head507d_olut_load(struct drm_color_lut *in, int size, void __iomem *mem) 259{ 260 for (; size--; in++, mem += 8) { 261 writew(drm_color_lut_extract(in-> red, 11) << 3, mem + 0); 262 writew(drm_color_lut_extract(in->green, 11) << 3, mem + 2); 263 writew(drm_color_lut_extract(in-> blue, 11) << 3, mem + 4); 264 } 265 266 /* INTERPOLATE modes require a "next" entry to interpolate with, 267 * so we replicate the last entry to deal with this for now. 268 */ 269 writew(readw(mem - 8), mem + 0); 270 writew(readw(mem - 6), mem + 2); 271 writew(readw(mem - 4), mem + 4); 272} 273 |
|
257void 258head507d_olut(struct nv50_head *head, struct nv50_head_atom *asyh) 259{ 260 if (asyh->base.cpp == 1) 261 asyh->olut.mode = 0; 262 else 263 asyh->olut.mode = 1; | 274void 275head507d_olut(struct nv50_head *head, struct nv50_head_atom *asyh) 276{ 277 if (asyh->base.cpp == 1) 278 asyh->olut.mode = 0; 279 else 280 asyh->olut.mode = 1; |
281 282 asyh->olut.load = head507d_olut_load; |
|
264} 265 266void 267head507d_mode(struct nv50_head *head, struct nv50_head_atom *asyh) 268{ 269 struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan; 270 struct nv50_head_mode *m = &asyh->mode; 271 u32 *push; --- 54 unchanged lines hidden --- | 283} 284 285void 286head507d_mode(struct nv50_head *head, struct nv50_head_atom *asyh) 287{ 288 struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan; 289 struct nv50_head_mode *m = &asyh->mode; 290 u32 *push; --- 54 unchanged lines hidden --- |