Commit deac453
committed
drm/i915: Fix glk+ degamma LUT conversions
The current implementation of change_lut_val_precision() is just
a convoluted way of shifting by 8. Implement the proper rounding
by just using drm_color_lut_extract() and intel_color_lut_pack()
like everyone else does.
And as the uapi can't handle >=1.0 values but the hardware
can we need to clamp the results appropriately in the readout
path.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231013131402.24072-5-ville.syrjala@linux.intel.com
Reviewed-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>1 parent 5d76c81 commit deac453
1 file changed
Lines changed: 28 additions & 26 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1526 | 1526 | | |
1527 | 1527 | | |
1528 | 1528 | | |
1529 | | - | |
1530 | | - | |
1531 | | - | |
1532 | | - | |
1533 | | - | |
1534 | | - | |
| 1529 | + | |
| 1530 | + | |
| 1531 | + | |
| 1532 | + | |
| 1533 | + | |
| 1534 | + | |
| 1535 | + | |
| 1536 | + | |
| 1537 | + | |
| 1538 | + | |
| 1539 | + | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
| 1544 | + | |
| 1545 | + | |
1535 | 1546 | | |
1536 | | - | |
| 1547 | + | |
| 1548 | + | |
| 1549 | + | |
1537 | 1550 | | |
1538 | 1551 | | |
1539 | 1552 | | |
| |||
1570 | 1583 | | |
1571 | 1584 | | |
1572 | 1585 | | |
1573 | | - | |
1574 | | - | |
1575 | | - | |
1576 | | - | |
1577 | | - | |
1578 | | - | |
1579 | | - | |
1580 | 1586 | | |
1581 | | - | |
| 1587 | + | |
| 1588 | + | |
1582 | 1589 | | |
1583 | 1590 | | |
1584 | 1591 | | |
1585 | 1592 | | |
1586 | | - | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
1587 | 1596 | | |
1588 | 1597 | | |
1589 | 1598 | | |
| |||
3570 | 3579 | | |
3571 | 3580 | | |
3572 | 3581 | | |
3573 | | - | |
3574 | | - | |
3575 | | - | |
3576 | | - | |
3577 | | - | |
3578 | 3582 | | |
3579 | | - | |
3580 | | - | |
3581 | | - | |
3582 | | - | |
3583 | | - | |
| 3583 | + | |
| 3584 | + | |
| 3585 | + | |
3584 | 3586 | | |
3585 | 3587 | | |
3586 | 3588 | | |
| |||
0 commit comments