[Openchrome-devel] [PATCH 2/2] via: Add missing magic value to IGA1 fetch count
James Simmons
jsimmons
Thu Aug 30 18:17:41 PDT 2012
On Thu, 16 Aug 2012, Ondrej Zary wrote:
> Fetch count for IGA1 is missing magic "+4" that is called
> IGA1_FETCH_COUNT_PATCH_VALUE in viafb. This causes screen to be distorted
> at least on K8M890CE.
Yep, I'm missing that fetch count macro. Their is more brokeness than
that. The fetch register is dependent on the resolution change (done by
mode_set) and/or the color depth change (set_base). Currently the fetch
register is update when the resolution is changed. If the color depth only
changes the fecth register is not updated so it distorts the display as
well. I will attempt to create a patch to address this. Thanks for
pointing this out.
> Signed-off-by: Ondrej Zary <linux at rainbow-software.org>
>
> --- a/drivers/gpu/drm/via/via_display.c
> +++ b/drivers/gpu/drm/via/via_display.c
> @@ -784,7 +784,8 @@ via_iga1_mode_set_base_atomic(struct drm_crtc *crtc,
> struct drm_framebuffer *fb,
>
> /* Load Fetch registers */
> pitch = ALIGN((crtc->mode.hdisplay * fb->bits_per_pixel >> 3), 16) >> 4;
> - load_value_to_registers(VGABASE, &iga->fetch, pitch);
> + /* magic "+4" is from viafb IGA1_FETCH_COUNT_PATCH_VALUE */
> + load_value_to_registers(VGABASE, &iga->fetch, pitch + 4);
>
> if ((state == ENTER_ATOMIC_MODE_SET) ||
> crtc->fb->pitches[0] != fb->pitches[0]) {
>
> --
> Ondrej Zary
>
> _______________________________________________
> Openchrome-devel mailing list
> Openchrome-devel at openchrome.org
> http://wiki.openchrome.org/mailman/listinfo/openchrome-devel
>
>
>
More information about the Openchrome-devel
mailing list