- fix lut loading for cirrus
-----BEGIN PGP SIGNATURE----- iQIcBAABAgAGBQJacd1XAAoJEEN0HIUfOBk0MaIP+wd3Yn7T5af7qD8bQWrET1DS DgfjcdUA+t67qmG1pF1T/0TT6kaX5rnpjtAfutTQqIfpWiQnm9cB2x2aITfhaxcO 2pA7pvnuLJNda3McacDHqqxsPM3zP6F9ZpvIcvNpfkBXpbfR41L80iaJAHMD5OW6 XBZZuRqUoLhDP8vUXumUYgUIKRiEEKIx9MYYa+Hpj7W1s/xstRmz3stmCJ5a6/xU yHCEdNMU1oHeSqE1OeXlwhwKNwG72c1KSAvPKcYeczfFVjf4EY0Zr5T2m1LkkDhN NM0E91hHut8eI5mjmkI7anZHftTpQ+1Qflj+HdcvFSL5haXAob2YiHRTgqnkqDoD M+vh9gRHKcrqY3T25f24GHfLno4An4ORSAR6EzJbKw72MPrkl6DUp6Vw61fn55mP FFpuTIkKkVihL3gvBNCfrnjmqzZcVsrA/WUhy44yAesvWQy7lKF3Lm8m9TpihZF2 S8a+0+zHZGqKUzQXlAueYt5pZhIi7FKkBq68yc+MEQ+Toww406GSgkQerfqkoen0 G+oMrImAyEV/Cch+/uuNF9tm0C+kzwXQH+wGdAyCQDqv+2NLPLRZdopQmrKvI9Km 7u3TnRPlQn1s8sfp8izWfs6NVSoll+Ltgqdy8yTqUO4j7aPN7NIdXCNFlEadIJkk gBJ6wAh23ccwK0AIFVed =zm6+ -----END PGP SIGNATURE----- Merge tag 'drm-misc-fixes-2018-01-31' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes - fix lut loading for cirrus * tag 'drm-misc-fixes-2018-01-31' of git://anongit.freedesktop.org/drm/drm-misc: drm/cirrus: Load lut in crtc_commit
This commit is contained in:
commit
a6493417f8
|
@ -294,22 +294,7 @@ static void cirrus_crtc_prepare(struct drm_crtc *crtc)
|
|||
{
|
||||
}
|
||||
|
||||
/*
|
||||
* This is called after a mode is programmed. It should reverse anything done
|
||||
* by the prepare function
|
||||
*/
|
||||
static void cirrus_crtc_commit(struct drm_crtc *crtc)
|
||||
{
|
||||
}
|
||||
|
||||
/*
|
||||
* The core can pass us a set of gamma values to program. We actually only
|
||||
* use this for 8-bit mode so can't perform smooth fades on deeper modes,
|
||||
* but it's a requirement that we provide the function
|
||||
*/
|
||||
static int cirrus_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green,
|
||||
u16 *blue, uint32_t size,
|
||||
struct drm_modeset_acquire_ctx *ctx)
|
||||
static void cirrus_crtc_load_lut(struct drm_crtc *crtc)
|
||||
{
|
||||
struct drm_device *dev = crtc->dev;
|
||||
struct cirrus_device *cdev = dev->dev_private;
|
||||
|
@ -317,7 +302,7 @@ static int cirrus_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green,
|
|||
int i;
|
||||
|
||||
if (!crtc->enabled)
|
||||
return 0;
|
||||
return;
|
||||
|
||||
r = crtc->gamma_store;
|
||||
g = r + crtc->gamma_size;
|
||||
|
@ -330,6 +315,27 @@ static int cirrus_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green,
|
|||
WREG8(PALETTE_DATA, *g++ >> 8);
|
||||
WREG8(PALETTE_DATA, *b++ >> 8);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* This is called after a mode is programmed. It should reverse anything done
|
||||
* by the prepare function
|
||||
*/
|
||||
static void cirrus_crtc_commit(struct drm_crtc *crtc)
|
||||
{
|
||||
cirrus_crtc_load_lut(crtc);
|
||||
}
|
||||
|
||||
/*
|
||||
* The core can pass us a set of gamma values to program. We actually only
|
||||
* use this for 8-bit mode so can't perform smooth fades on deeper modes,
|
||||
* but it's a requirement that we provide the function
|
||||
*/
|
||||
static int cirrus_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green,
|
||||
u16 *blue, uint32_t size,
|
||||
struct drm_modeset_acquire_ctx *ctx)
|
||||
{
|
||||
cirrus_crtc_load_lut(crtc);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue