]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[media] blackfin: add display support in ppi driver
authorScott Jiang <scott.jiang.linux@gmail.com>
Fri, 12 Apr 2013 22:52:57 +0000 (19:52 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 21 May 2013 11:07:18 +0000 (08:07 -0300)
Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/platform/blackfin/ppi.c

index 01b5b501347eebdb5a540863acead54dba2a56db..15e9c2bac2b1bfeabba84e6236bbc6781fa2ab49 100644 (file)
@@ -266,6 +266,18 @@ static int ppi_set_params(struct ppi_if *ppi, struct ppi_params *params)
                bfin_write32(&reg->vcnt, params->height);
                if (params->int_mask)
                        bfin_write32(&reg->imsk, params->int_mask & 0xFF);
+               if (ppi->ppi_control & PORT_DIR) {
+                       u32 hsync_width, vsync_width, vsync_period;
+
+                       hsync_width = params->hsync
+                                       * params->bpp / params->dlen;
+                       vsync_width = params->vsync * samples_per_line;
+                       vsync_period = samples_per_line * params->frame;
+                       bfin_write32(&reg->fs1_wlhb, hsync_width);
+                       bfin_write32(&reg->fs1_paspl, samples_per_line);
+                       bfin_write32(&reg->fs2_wlvb, vsync_width);
+                       bfin_write32(&reg->fs2_palpf, vsync_period);
+               }
                break;
        }
        default: