Two fixes for 4.8:

- missing static specifier on atmel_hlcdc_crtc_reset()
 - bug in the hardware scaling logic
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJXzrs6AAoJEGXtNgF+CLcAtIQQALMC11EZjUhudl9rnpIzaUqQ
 u2YkOKKc33JeViJyjigCjcMb3xar27KnYtJDUpKxMWqQH9QU0xjsN+SwJDebZnHs
 kec3uZvYUaaSWufOwQhKo/50IIk8uOrTxTQKv5XjuCwe2y1AZ821Ip09Z3S+CLKc
 DaHas3Zx516lgxl4HxGupnfj4VQvfyddLnkJjqhhrBdJuEeCX5M+CNZyIaBAmF1y
 AwLhxB2VyrecDCZzjBvQn8lSgYh14zHOMnq2I12kptZFGjdNhSxJNubJMrc/bXxr
 PXDXP8Sa/ZiVGesBui/KbicY1PPig31bx1gOpgMmI8Ex68vKOdnclGtqpaN9RU+Y
 FVFCUOx+BDCs3IlX13UpNQNAmSBWSTmS7aAQPUiiFB1T9pT/4CuNjT6g9sffOX+Q
 tSfnG7ovMQj+lkdFxJUpV1sEkD027qQVwCojJIux5HYUjl/DoBOyqiDmaZekZiRx
 HEzFqHj5dVEaH3pJYPiY1/R/Qbi3V51X6IcAyxvCIhNLeW4RycCx4NlQF+7IhrT0
 nGFgCzdob1lmpmrF/wgdSwWaqlBGnYmSZbrUAZmm/Hb6agWEJG3Bcj5bOFuE9EjH
 Kl2VmHo4gnkQpRBP3tqj8eHJQKntuFh5LJVE5eR20OWtYD8NNWpZMccP3oT1avW3
 3uLZaUHCMaI8oeWwaft4
 =IYWT
 -----END PGP SIGNATURE-----

Merge tag 'drm/atmel-hlcdc/4.8-fixes' of github.com:bbrezillon/linux-at91 into drm-fixes

Two fixes for 4.8:
- missing static specifier on atmel_hlcdc_crtc_reset()
- bug in the hardware scaling logic

* tag 'drm/atmel-hlcdc/4.8-fixes' of github.com:bbrezillon/linux-at91:
  drm/atmel-hlcdc: Make ->reset() implementation static
  drm: atmel-hlcdc: Fix vertical scaling
This commit is contained in:
Dave Airlie 2016-09-13 10:18:02 +10:00
commit 7eebfba5c4
2 changed files with 6 additions and 6 deletions

View file

@ -387,7 +387,7 @@ void atmel_hlcdc_crtc_irq(struct drm_crtc *c)
atmel_hlcdc_crtc_finish_page_flip(drm_crtc_to_atmel_hlcdc_crtc(c));
}
void atmel_hlcdc_crtc_reset(struct drm_crtc *crtc)
static void atmel_hlcdc_crtc_reset(struct drm_crtc *crtc)
{
struct atmel_hlcdc_crtc_state *state;

View file

@ -320,19 +320,19 @@ atmel_hlcdc_plane_update_pos_and_size(struct atmel_hlcdc_plane *plane,
u32 *coeff_tab = heo_upscaling_ycoef;
u32 max_memsize;
if (state->crtc_w < state->src_w)
if (state->crtc_h < state->src_h)
coeff_tab = heo_downscaling_ycoef;
for (i = 0; i < ARRAY_SIZE(heo_upscaling_ycoef); i++)
atmel_hlcdc_layer_update_cfg(&plane->layer,
33 + i,
0xffffffff,
coeff_tab[i]);
factor = ((8 * 256 * state->src_w) - (256 * 4)) /
state->crtc_w;
factor = ((8 * 256 * state->src_h) - (256 * 4)) /
state->crtc_h;
factor++;
max_memsize = ((factor * state->crtc_w) + (256 * 4)) /
max_memsize = ((factor * state->crtc_h) + (256 * 4)) /
2048;
if (max_memsize > state->src_w)
if (max_memsize > state->src_h)
factor--;
factor_reg |= (factor << 16) | 0x80000000;
}