[media] v4l: vsp1: Add global alpha support for DRM pipeline
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Thu, 24 Mar 2016 08:15:59 +0000 (05:15 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Wed, 13 Apr 2016 22:15:23 +0000 (19:15 -0300)
Make the global alpha multiplier of DRM planes configurable. All the
necessary infrastructure is there, we just need to store the alpha value
passed through the DRM API.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/platform/vsp1/vsp1_drm.c
include/media/vsp1.h

index d85cb0e258c9256cb67d7f559ead4854c5297e5b..fc4bbc401e675f6dfcd94dfcf796dc4d8fe21ba4 100644 (file)
@@ -235,6 +235,7 @@ EXPORT_SYMBOL_GPL(vsp1_du_atomic_begin);
  * @mem: DMA addresses of the memory buffers (one per plane)
  * @src: the source crop rectangle for the RPF
  * @dst: the destination compose rectangle for the BRU input
+ * @alpha: global alpha value for the input
  * @zpos: the Z-order position of the input
  *
  * Configure the VSP to perform composition of the image referenced by @mem
@@ -263,7 +264,8 @@ EXPORT_SYMBOL_GPL(vsp1_du_atomic_begin);
 int vsp1_du_atomic_update_ext(struct device *dev, unsigned int rpf_index,
                              u32 pixelformat, unsigned int pitch,
                              dma_addr_t mem[2], const struct v4l2_rect *src,
-                             const struct v4l2_rect *dst, unsigned int zpos)
+                             const struct v4l2_rect *dst, unsigned int alpha,
+                             unsigned int zpos)
 {
        struct vsp1_device *vsp1 = dev_get_drvdata(dev);
        const struct vsp1_format_info *fmtinfo;
@@ -303,6 +305,7 @@ int vsp1_du_atomic_update_ext(struct device *dev, unsigned int rpf_index,
        rpf->format.num_planes = fmtinfo->planes;
        rpf->format.plane_fmt[0].bytesperline = pitch;
        rpf->format.plane_fmt[1].bytesperline = pitch;
+       rpf->alpha = alpha;
 
        rpf->mem.addr[0] = mem[0];
        rpf->mem.addr[1] = mem[1];
index e54a493bd3ff09ebbc2e95826654132536337fdf..3e654a0455bd95bc0373e82547fd640385937f4b 100644 (file)
@@ -27,7 +27,8 @@ void vsp1_du_atomic_begin(struct device *dev);
 int vsp1_du_atomic_update_ext(struct device *dev, unsigned int rpf,
                              u32 pixelformat, unsigned int pitch,
                              dma_addr_t mem[2], const struct v4l2_rect *src,
-                             const struct v4l2_rect *dst, unsigned int zpos);
+                             const struct v4l2_rect *dst, unsigned int alpha,
+                             unsigned int zpos);
 void vsp1_du_atomic_flush(struct device *dev);
 
 static inline int vsp1_du_atomic_update(struct device *dev,
@@ -37,7 +38,7 @@ static inline int vsp1_du_atomic_update(struct device *dev,
                                        const struct v4l2_rect *dst)
 {
        return vsp1_du_atomic_update_ext(dev, rpf_index, pixelformat, pitch,
-                                        mem, src, dst, 0);
+                                        mem, src, dst, 255, 0);
 }
 
 #endif /* __MEDIA_VSP1_H__ */
This page took 0.027197 seconds and 5 git commands to generate.