Patchwork Fix UMA memory range in RS780/RS785G

login
register
about
Submitter Rudolf Marek
Date 2010-08-16 18:49:09
Message ID <4C698825.3030308@assembler.cz>
Download mbox | patch
Permalink /patch/1750/
State Accepted
Commit r5705
Headers show

Comments

Rudolf Marek - 2010-08-16 18:49:09
Hello,

Attached patches fixes a video BIOS freeze with 128MB UMA. It looks like the 
internal address 0xc0000000 - 0xcfffffff was hardcoded. The change just takes
the fb size to account resulting in - 0xc7ffffff for 128MB UMA.

Signed-off-by: Rudolf Marek <r.marek@assembler.cz>

Yes it took some hours to find this out...

Thanks,
Rudolf
Marc Jones - 2010-08-17 01:42:06
2010/8/16 Rudolf Marek <r.marek@assembler.cz>:
> Hello,
>
> Attached patches fixes a video BIOS freeze with 128MB UMA. It looks like the
> internal address 0xc0000000 - 0xcfffffff was hardcoded. The change just
> takes
> the fb size to account resulting in - 0xc7ffffff for 128MB UMA.
>
> Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
>

Good catch.

Acked-by: Marc Jones <marcj303@gmail.com>

Patch

Index: src/southbridge/amd/rs780/rs780_gfx.c
===================================================================
--- src/southbridge/amd/rs780/rs780_gfx.c	(revision 5695)
+++ src/southbridge/amd/rs780/rs780_gfx.c	(working copy)
@@ -660,8 +660,10 @@ 
 
 	/* Set UMA in the 780 side. */
 	/* UMA start address, size. */
-	/* The same value in spite of system memory size. */
-	nbmc_write_index(nb_dev, 0x10, 0xcfffc000);
+	/* The UMA starts at 0xC0000000 of internal RS780 address space
+	    [31:16] addr of last byte | [31:16] addr of first byte
+	*/
+	nbmc_write_index(nb_dev, 0x10, ((uma_memory_size - 1 + 0xC0000000) & (~0xffff)) | 0xc000);
 	nbmc_write_index(nb_dev, 0x11, uma_memory_base);
 	nbmc_write_index(nb_dev, 0x12, 0);
 	nbmc_write_index(nb_dev, 0xf0, 256);