[media] adv7842: set defaults spa-location
authorMartin Bugge <marbugge@cisco.com>
Thu, 5 Dec 2013 14:46:21 +0000 (11:46 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Tue, 7 Jan 2014 08:29:54 +0000 (06:29 -0200)
For edid with no Source Physical Address (spa), set
spa-location to default and use correct values from edid.

Signed-off-by: Martin Bugge <marbugge@cisco.com>
Cc: Mats Randgaard <matrandg@cisco.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/i2c/adv7842.c

index 23f3c1f5f010aafe4e190573fcaf511ef78a52de..8d0edd47b65d0fe0a741bbb9ecce3348ad0b7fdd 100644 (file)
@@ -716,15 +716,15 @@ static int edid_write_hdmi_segment(struct v4l2_subdev *sd, u8 port)
                }
                rep_write(sd, 0x76, spa_loc);
        } else {
-               /* default register values for SPA */
+               /* Edid values for SPA location */
                if (port == 0) {
-                       /* port A SPA */
-                       rep_write(sd, 0x72, 0);
-                       rep_write(sd, 0x73, 0);
+                       /* port A */
+                       rep_write(sd, 0x72, val[0xc0]);
+                       rep_write(sd, 0x73, val[0xc1]);
                } else {
-                       /* port B SPA */
-                       rep_write(sd, 0x74, 0);
-                       rep_write(sd, 0x75, 0);
+                       /* port B */
+                       rep_write(sd, 0x74, val[0xc0]);
+                       rep_write(sd, 0x75, val[0xc1]);
                }
                rep_write(sd, 0x76, 0xc0);
        }