mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	drm/exynos: fimc: Convert driver to IPP v2 core API
This patch adapts Exynos DRM FIMC driver to new IPP v2 core API. The side effect of this conversion is a switch to driver component API to register properly in the Exynos DRM core. Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Merge conflict so merged manually. Signed-off-by: Inki Dae <inki.dae@samsung.com>
This commit is contained in:
		
							parent
							
								
									8b7d3ec83a
								
							
						
					
					
						commit
						7a2d5c77c5
					
				
					 5 changed files with 370 additions and 760 deletions
				
			
		| 
						 | 
					@ -100,7 +100,7 @@ config DRM_EXYNOS_IPP
 | 
				
			||||||
 | 
					
 | 
				
			||||||
config DRM_EXYNOS_FIMC
 | 
					config DRM_EXYNOS_FIMC
 | 
				
			||||||
	bool "FIMC"
 | 
						bool "FIMC"
 | 
				
			||||||
	depends on BROKEN && MFD_SYSCON
 | 
						select DRM_EXYNOS_IPP
 | 
				
			||||||
	help
 | 
						help
 | 
				
			||||||
	  Choose this option if you want to use Exynos FIMC for DRM.
 | 
						  Choose this option if you want to use Exynos FIMC for DRM.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -222,6 +222,7 @@ struct exynos_drm_driver_info {
 | 
				
			||||||
#define DRM_COMPONENT_DRIVER	BIT(0)	/* supports component framework */
 | 
					#define DRM_COMPONENT_DRIVER	BIT(0)	/* supports component framework */
 | 
				
			||||||
#define DRM_VIRTUAL_DEVICE	BIT(1)	/* create virtual platform device */
 | 
					#define DRM_VIRTUAL_DEVICE	BIT(1)	/* create virtual platform device */
 | 
				
			||||||
#define DRM_DMA_DEVICE		BIT(2)	/* can be used for dma allocations */
 | 
					#define DRM_DMA_DEVICE		BIT(2)	/* can be used for dma allocations */
 | 
				
			||||||
 | 
					#define DRM_FIMC_DEVICE		BIT(3)	/* devices shared with V4L2 subsystem */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#define DRV_PTR(drv, cond) (IS_ENABLED(cond) ? &drv : NULL)
 | 
					#define DRV_PTR(drv, cond) (IS_ENABLED(cond) ? &drv : NULL)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -261,6 +262,7 @@ static struct exynos_drm_driver_info exynos_drm_drivers[] = {
 | 
				
			||||||
		DRV_PTR(g2d_driver, CONFIG_DRM_EXYNOS_G2D),
 | 
							DRV_PTR(g2d_driver, CONFIG_DRM_EXYNOS_G2D),
 | 
				
			||||||
	}, {
 | 
						}, {
 | 
				
			||||||
		DRV_PTR(fimc_driver, CONFIG_DRM_EXYNOS_FIMC),
 | 
							DRV_PTR(fimc_driver, CONFIG_DRM_EXYNOS_FIMC),
 | 
				
			||||||
 | 
							DRM_COMPONENT_DRIVER | DRM_FIMC_DEVICE,
 | 
				
			||||||
	}, {
 | 
						}, {
 | 
				
			||||||
		DRV_PTR(rotator_driver, CONFIG_DRM_EXYNOS_ROTATOR),
 | 
							DRV_PTR(rotator_driver, CONFIG_DRM_EXYNOS_ROTATOR),
 | 
				
			||||||
		DRM_COMPONENT_DRIVER
 | 
							DRM_COMPONENT_DRIVER
 | 
				
			||||||
| 
						 | 
					@ -294,7 +296,11 @@ static struct component_match *exynos_drm_match_add(struct device *dev)
 | 
				
			||||||
					    &info->driver->driver,
 | 
										    &info->driver->driver,
 | 
				
			||||||
					    (void *)platform_bus_type.match))) {
 | 
										    (void *)platform_bus_type.match))) {
 | 
				
			||||||
			put_device(p);
 | 
								put_device(p);
 | 
				
			||||||
			component_match_add(dev, &match, compare_dev, d);
 | 
					
 | 
				
			||||||
 | 
								if (!(info->flags & DRM_FIMC_DEVICE) ||
 | 
				
			||||||
 | 
								    exynos_drm_check_fimc_device(d) == 0)
 | 
				
			||||||
 | 
									component_match_add(dev, &match,
 | 
				
			||||||
 | 
											    compare_dev, d);
 | 
				
			||||||
			p = d;
 | 
								p = d;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		put_device(p);
 | 
							put_device(p);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -273,6 +273,15 @@ static inline int exynos_dpi_bind(struct drm_device *dev,
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifdef CONFIG_DRM_EXYNOS_FIMC
 | 
				
			||||||
 | 
					int exynos_drm_check_fimc_device(struct device *dev);
 | 
				
			||||||
 | 
					#else
 | 
				
			||||||
 | 
					static inline int exynos_drm_check_fimc_device(struct device *dev)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						return 0;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int exynos_atomic_commit(struct drm_device *dev, struct drm_atomic_state *state,
 | 
					int exynos_atomic_commit(struct drm_device *dev, struct drm_atomic_state *state,
 | 
				
			||||||
			 bool nonblock);
 | 
								 bool nonblock);
 | 
				
			||||||
int exynos_atomic_check(struct drm_device *dev, struct drm_atomic_state *state);
 | 
					int exynos_atomic_check(struct drm_device *dev, struct drm_atomic_state *state);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							| 
						 | 
					@ -1,23 +0,0 @@
 | 
				
			||||||
/*
 | 
					 | 
				
			||||||
 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * Authors:
 | 
					 | 
				
			||||||
 *	Eunchul Kim <chulspro.kim@samsung.com>
 | 
					 | 
				
			||||||
 *	Jinyoung Jeon <jy0.jeon@samsung.com>
 | 
					 | 
				
			||||||
 *	Sangmin Lee <lsmin.lee@samsung.com>
 | 
					 | 
				
			||||||
 *
 | 
					 | 
				
			||||||
 * This program is free software; you can redistribute  it and/or modify it
 | 
					 | 
				
			||||||
 * under  the terms of  the GNU General  Public License as published by the
 | 
					 | 
				
			||||||
 * Free Software Foundation;  either version 2 of the  License, or (at your
 | 
					 | 
				
			||||||
 * option) any later version.
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#ifndef _EXYNOS_DRM_FIMC_H_
 | 
					 | 
				
			||||||
#define _EXYNOS_DRM_FIMC_H_
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
/*
 | 
					 | 
				
			||||||
 * TODO
 | 
					 | 
				
			||||||
 * FIMD output interface notifier callback.
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
#endif /* _EXYNOS_DRM_FIMC_H_ */
 | 
					 | 
				
			||||||
		Loading…
	
		Reference in a new issue