drivers/amlogic/media/osd: change L2C1 register for osd_two_ports function
authorPortisch <hugo.portisch@yahoo.de>
Tue, 9 Jul 2019 05:57:43 +0000 (07:57 +0200)
committerNick Xie <nick@khadas.com>
Fri, 12 Jul 2019 05:37:10 +0000 (13:37 +0800)
This will change the osd _two_port register to VPU_WRARB_MODE_L2C1.
On S922X devices the system freezed sometimes on osd hardware init.

drivers/amlogic/media/osd/osd_hw.c
drivers/amlogic/media/osd/osd_reg.h

index 1afcc95..2457f3d 100644 (file)
@@ -3239,12 +3239,12 @@ static void osd_set_two_ports(bool set)
 
        if (set) {
                data32[0] = osd_reg_read(VPP_RDARB_MODE);
-               data32[1] = osd_reg_read(VPU_RDARB_MODE_L2C1);
+               data32[1] = osd_reg_read(VPU_WRARB_MODE_L2C1);
                osd_reg_set_bits(VPP_RDARB_MODE, 2, 20, 8);
-               osd_reg_set_bits(VPU_RDARB_MODE_L2C1, 2, 16, 8);
+               osd_reg_set_bits(VPU_WRARB_MODE_L2C1, 2, 16, 4);
        } else {
                osd_reg_write(VPP_RDARB_MODE, data32[0]);
-               osd_reg_write(VPU_RDARB_MODE_L2C1, data32[1]);
+               osd_reg_write(VPU_WRARB_MODE_L2C1, data32[1]);
        }
 }
 
index 517ca97..8821d24 100644 (file)
 #define VPP_POST_BLEND_DUMMY_ALPHA                 0x3969
 #define VPP_RDARB_MODE                             0x3978
 #define VPP_RDARB_REQEN_SLV                        0x3979
+#define VPU_WRARB_MODE_L2C1                        0x27a2
 #define VPU_RDARB_MODE_L2C1                        0x279d
 
 /*VIU2 osd1 reg*/