Commit 7eebfba5 authored by Dave Airlie's avatar Dave Airlie

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
parents 062f531a 1ba7db07
...@@ -387,7 +387,7 @@ void atmel_hlcdc_crtc_irq(struct drm_crtc *c) ...@@ -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)); 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; struct atmel_hlcdc_crtc_state *state;
......
...@@ -320,19 +320,19 @@ atmel_hlcdc_plane_update_pos_and_size(struct atmel_hlcdc_plane *plane, ...@@ -320,19 +320,19 @@ atmel_hlcdc_plane_update_pos_and_size(struct atmel_hlcdc_plane *plane,
u32 *coeff_tab = heo_upscaling_ycoef; u32 *coeff_tab = heo_upscaling_ycoef;
u32 max_memsize; u32 max_memsize;
if (state->crtc_w < state->src_w) if (state->crtc_h < state->src_h)
coeff_tab = heo_downscaling_ycoef; coeff_tab = heo_downscaling_ycoef;
for (i = 0; i < ARRAY_SIZE(heo_upscaling_ycoef); i++) for (i = 0; i < ARRAY_SIZE(heo_upscaling_ycoef); i++)
atmel_hlcdc_layer_update_cfg(&plane->layer, atmel_hlcdc_layer_update_cfg(&plane->layer,
33 + i, 33 + i,
0xffffffff, 0xffffffff,
coeff_tab[i]); coeff_tab[i]);
factor = ((8 * 256 * state->src_w) - (256 * 4)) / factor = ((8 * 256 * state->src_h) - (256 * 4)) /
state->crtc_w; state->crtc_h;
factor++; factor++;
max_memsize = ((factor * state->crtc_w) + (256 * 4)) / max_memsize = ((factor * state->crtc_h) + (256 * 4)) /
2048; 2048;
if (max_memsize > state->src_w) if (max_memsize > state->src_h)
factor--; factor--;
factor_reg |= (factor << 16) | 0x80000000; factor_reg |= (factor << 16) | 0x80000000;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment