[Openchrome-devel] [PATCH 1/2] via: fix line compare
James Simmons
jsimmons
Thu Aug 30 17:17:01 PDT 2012
> Line compare register writes are obviously wrong:
>
> Register 0x33 is written with value 0x05 using mask 0x06
> It causes left side of the screen to be garbled and shifted right
> at least on K8M890CE.
Yeap, your right. I just looked at the hardware specs and noticed
the line compare comment is completely wrong above register 0x33.
Bits 0-2 are for HSYNCH Adjuster. The value you have is for shifting
by 1 character. I will update your patch for that comment update.
> Register 0x09 is written using mask 0xff, overwriting bit 5
> (which is bit 9 of vblank_start register).
> It causes blue horizontal bar on top of screen and blank bar in the middle
> at least on K8M890CE.
Yeap you are correct.
> Fix the writes to match viafb.
>
> Signed-off-by: Ondrej Zary <linux at rainbow-software.org>
Acked-by: James Simmons <jsimmons at infradead.org>
> --- a/drivers/gpu/drm/via/via_display.c
> +++ b/drivers/gpu/drm/via/via_display.c
> @@ -678,11 +678,11 @@ via_crtc_mode_set(struct drm_crtc *crtc, struct
> drm_display_mode *mode,
> /* line compare should set all bits = 1 (extend modes) */
> svga_wcrt_mask(VGABASE, 0x07, BIT(4), BIT(4));
> /* line compare should set all bits = 1 (extend modes) */
> - svga_wcrt_mask(VGABASE, 0x09, BIT(6), 0xFF);
> + svga_wcrt_mask(VGABASE, 0x09, BIT(6), BIT(6));
> /* line compare should set all bits = 1 (extend modes) */
> svga_wcrt_mask(VGABASE, 0x35, BIT(4), BIT(4));
> /* line compare should set all bits = 1 (extend modes) */
> - svga_wcrt_mask(VGABASE, 0x33, 0x05, 0x06);
> + svga_wcrt_mask(VGABASE, 0x33, 0x06, 0x07);
> /* extend mode always set to e3h */
> vga_wcrt(VGABASE, 0x17, 0xE3);
> /* extend mode always set to 0h */
>
> --
> 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