wndw.c (aaccf3c97418f169afdbb5855e9cbcbda34e90fd) wndw.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

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

134
135 if (asyw->set.sema ) wndw->func->sema_set (wndw, asyw);
136 if (asyw->set.ntfy ) wndw->func->ntfy_set (wndw, asyw);
137 if (asyw->set.image) wndw->func->image_set(wndw, asyw);
138
139 if (asyw->set.xlut ) {
140 if (asyw->ilut) {
141 asyw->xlut.i.offset =
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

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

134
135 if (asyw->set.sema ) wndw->func->sema_set (wndw, asyw);
136 if (asyw->set.ntfy ) wndw->func->ntfy_set (wndw, asyw);
137 if (asyw->set.image) wndw->func->image_set(wndw, asyw);
138
139 if (asyw->set.xlut ) {
140 if (asyw->ilut) {
141 asyw->xlut.i.offset =
142 nv50_lut_load(&wndw->ilut,
143 asyw->xlut.i.mode <= 1,
144 asyw->xlut.i.buffer,
145 asyw->ilut);
142 nv50_lut_load(&wndw->ilut, asyw->xlut.i.buffer,
143 asyw->ilut, asyw->xlut.i.load);
146 }
147 wndw->func->xlut_set(wndw, asyw);
148 }
149
150 if (asyw->set.scale) wndw->func->scale_set(wndw, asyw);
151 if (asyw->set.point) {
152 if (asyw->set.point = false, asyw->set.mask)
153 interlock[wndw->interlock.type] |= wndw->interlock.data;

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

317 }
318
319 if (wndw->func->ilut)
320 asyh->wndw.olut |= BIT(wndw->id);
321 } else {
322 asyh->wndw.olut &= ~BIT(wndw->id);
323 }
324
144 }
145 wndw->func->xlut_set(wndw, asyw);
146 }
147
148 if (asyw->set.scale) wndw->func->scale_set(wndw, asyw);
149 if (asyw->set.point) {
150 if (asyw->set.point = false, asyw->set.mask)
151 interlock[wndw->interlock.type] |= wndw->interlock.data;

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

315 }
316
317 if (wndw->func->ilut)
318 asyh->wndw.olut |= BIT(wndw->id);
319 } else {
320 asyh->wndw.olut &= ~BIT(wndw->id);
321 }
322
323 if (!ilut && wndw->func->ilut_identity) {
324 static struct drm_property_blob dummy = {};
325 ilut = &dummy;
326 }
327
325 /* Recalculate LUT state. */
326 memset(&asyw->xlut, 0x00, sizeof(asyw->xlut));
327 if ((asyw->ilut = wndw->func->ilut ? ilut : NULL)) {
328 wndw->func->ilut(wndw, asyw);
329 asyw->xlut.handle = wndw->wndw.vram.handle;
330 asyw->xlut.i.buffer = !asyw->xlut.i.buffer;
331 asyw->set.xlut = true;
332 }

--- 311 unchanged lines hidden ---
328 /* Recalculate LUT state. */
329 memset(&asyw->xlut, 0x00, sizeof(asyw->xlut));
330 if ((asyw->ilut = wndw->func->ilut ? ilut : NULL)) {
331 wndw->func->ilut(wndw, asyw);
332 asyw->xlut.handle = wndw->wndw.vram.handle;
333 asyw->xlut.i.buffer = !asyw->xlut.i.buffer;
334 asyw->set.xlut = true;
335 }

--- 311 unchanged lines hidden ---