diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-24 20:35:10 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-24 20:35:10 -0500 |
commit | 21fbd5809ad126b949206d78e0a0e07ec872ea11 (patch) | |
tree | a824045df99fc1f0690095a925cceb50207e332b /drivers/media/platform/s5p-g2d/g2d.c | |
parent | d9978ec5680059d727b39d6c706777c6973587f2 (diff) | |
parent | ed72d37a33fdf43dc47787fe220532cdec9da528 (diff) |
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media updates from Mauro Carvalho Chehab:
- Some cleanups at V4L2 documentation
- new drivers: ts2020 frontend, ov9650 sensor, s5c73m3 sensor,
sh-mobile veu mem2mem driver, radio-ma901, davinci_vpfe staging
driver
- Lots of missing MAINTAINERS entries added
- several em28xx driver improvements, including its conversion to
videobuf2
- several fixups on drivers to make them to better comply with the API
- DVB core: add support for DVBv5 stats, allowing the implementation of
statistics for new standards like ISDB
- mb86a20s: add statistics to the driver
- lots of new board additions, cleanups, and driver improvements.
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (596 commits)
[media] media: Add 0x3009 USB PID to ttusb2 driver (fixed diff)
[media] rtl28xxu: Add USB IDs for Compro VideoMate U620F
[media] em28xx: add usb id for terratec h5 rev. 3
[media] media: rc: gpio-ir-recv: add support for device tree parsing
[media] mceusb: move check earlier to make smatch happy
[media] radio-si470x doc: add info about v4l2-ctl and sox+alsa
[media] staging: media: Remove unnecessary OOM messages
[media] sh_vou: Use vou_dev instead of vou_file wherever possible
[media] sh_vou: Use video_drvdata()
[media] drivers/media/platform/soc_camera/pxa_camera.c: use devm_ functions
[media] mt9t112: mt9t111 format set up differs from mt9t112
[media] sh-mobile-ceu-camera: fix SHARPNESS control default
Revert "[media] fc0011: Return early, if the frequency is already tuned"
[media] cx18/ivtv: fix regression: remove __init from a non-init function
[media] em28xx: fix analog streaming with USB bulk transfers
[media] stv0900: remove unnecessary null pointer check
[media] fc0011: Return early, if the frequency is already tuned
[media] fc0011: Add some sanity checks and cleanups
[media] fc0011: Fix xin value clamping
Revert "[media] [PATH,1/2] mxl5007 move reset to attach"
...
Diffstat (limited to 'drivers/media/platform/s5p-g2d/g2d.c')
-rw-r--r-- | drivers/media/platform/s5p-g2d/g2d.c | 35 |
1 files changed, 31 insertions, 4 deletions
diff --git a/drivers/media/platform/s5p-g2d/g2d.c b/drivers/media/platform/s5p-g2d/g2d.c index 6ed259fb1046..aaaf276a5a6c 100644 --- a/drivers/media/platform/s5p-g2d/g2d.c +++ b/drivers/media/platform/s5p-g2d/g2d.c | |||
@@ -604,8 +604,13 @@ static void device_run(void *prv) | |||
604 | g2d_set_flip(dev, ctx->flip); | 604 | g2d_set_flip(dev, ctx->flip); |
605 | 605 | ||
606 | if (ctx->in.c_width != ctx->out.c_width || | 606 | if (ctx->in.c_width != ctx->out.c_width || |
607 | ctx->in.c_height != ctx->out.c_height) | 607 | ctx->in.c_height != ctx->out.c_height) { |
608 | cmd |= g2d_cmd_stretch(1); | 608 | if (dev->variant->hw_rev == TYPE_G2D_3X) |
609 | cmd |= CMD_V3_ENABLE_STRETCH; | ||
610 | else | ||
611 | g2d_set_v41_stretch(dev, &ctx->in, &ctx->out); | ||
612 | } | ||
613 | |||
609 | g2d_set_cmd(dev, cmd); | 614 | g2d_set_cmd(dev, cmd); |
610 | g2d_start(dev); | 615 | g2d_start(dev); |
611 | 616 | ||
@@ -713,7 +718,7 @@ static int g2d_probe(struct platform_device *pdev) | |||
713 | return PTR_ERR(dev->regs); | 718 | return PTR_ERR(dev->regs); |
714 | 719 | ||
715 | dev->clk = clk_get(&pdev->dev, "sclk_fimg2d"); | 720 | dev->clk = clk_get(&pdev->dev, "sclk_fimg2d"); |
716 | if (IS_ERR_OR_NULL(dev->clk)) { | 721 | if (IS_ERR(dev->clk)) { |
717 | dev_err(&pdev->dev, "failed to get g2d clock\n"); | 722 | dev_err(&pdev->dev, "failed to get g2d clock\n"); |
718 | return -ENXIO; | 723 | return -ENXIO; |
719 | } | 724 | } |
@@ -725,7 +730,7 @@ static int g2d_probe(struct platform_device *pdev) | |||
725 | } | 730 | } |
726 | 731 | ||
727 | dev->gate = clk_get(&pdev->dev, "fimg2d"); | 732 | dev->gate = clk_get(&pdev->dev, "fimg2d"); |
728 | if (IS_ERR_OR_NULL(dev->gate)) { | 733 | if (IS_ERR(dev->gate)) { |
729 | dev_err(&pdev->dev, "failed to get g2d clock gate\n"); | 734 | dev_err(&pdev->dev, "failed to get g2d clock gate\n"); |
730 | ret = -ENXIO; | 735 | ret = -ENXIO; |
731 | goto unprep_clk; | 736 | goto unprep_clk; |
@@ -789,6 +794,7 @@ static int g2d_probe(struct platform_device *pdev) | |||
789 | } | 794 | } |
790 | 795 | ||
791 | def_frame.stride = (def_frame.width * def_frame.fmt->depth) >> 3; | 796 | def_frame.stride = (def_frame.width * def_frame.fmt->depth) >> 3; |
797 | dev->variant = g2d_get_drv_data(pdev); | ||
792 | 798 | ||
793 | return 0; | 799 | return 0; |
794 | 800 | ||
@@ -828,9 +834,30 @@ static int g2d_remove(struct platform_device *pdev) | |||
828 | return 0; | 834 | return 0; |
829 | } | 835 | } |
830 | 836 | ||
837 | static struct g2d_variant g2d_drvdata_v3x = { | ||
838 | .hw_rev = TYPE_G2D_3X, | ||
839 | }; | ||
840 | |||
841 | static struct g2d_variant g2d_drvdata_v4x = { | ||
842 | .hw_rev = TYPE_G2D_4X, /* Revision 4.1 for Exynos4X12 and Exynos5 */ | ||
843 | }; | ||
844 | |||
845 | static struct platform_device_id g2d_driver_ids[] = { | ||
846 | { | ||
847 | .name = "s5p-g2d", | ||
848 | .driver_data = (unsigned long)&g2d_drvdata_v3x, | ||
849 | }, { | ||
850 | .name = "s5p-g2d-v4x", | ||
851 | .driver_data = (unsigned long)&g2d_drvdata_v4x, | ||
852 | }, | ||
853 | {}, | ||
854 | }; | ||
855 | MODULE_DEVICE_TABLE(platform, g2d_driver_ids); | ||
856 | |||
831 | static struct platform_driver g2d_pdrv = { | 857 | static struct platform_driver g2d_pdrv = { |
832 | .probe = g2d_probe, | 858 | .probe = g2d_probe, |
833 | .remove = g2d_remove, | 859 | .remove = g2d_remove, |
860 | .id_table = g2d_driver_ids, | ||
834 | .driver = { | 861 | .driver = { |
835 | .name = G2D_NAME, | 862 | .name = G2D_NAME, |
836 | .owner = THIS_MODULE, | 863 | .owner = THIS_MODULE, |