diff mbox

[2/3] drm/omapdrm: Change possible_crtcs to possible_crtcs_for_planes

Message ID 0ff3b3fa288e4bf48b4e94f9006c385e79cac46f.1489523660.git.jsarha@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jyri Sarha March 14, 2017, 8:35 p.m. UTC
Rename possible_crtcs local variable to possible_crtcs_for_planes in
omap_modeset_init() and add a comment about its initialization. This
is to make it more explicit what the variable is used for.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
---
 drivers/gpu/drm/omapdrm/omap_drv.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

Comments

Tomi Valkeinen March 15, 2017, 10:16 a.m. UTC | #1
On 14/03/17 22:35, Jyri Sarha wrote:
> Rename possible_crtcs local variable to possible_crtcs_for_planes in
> omap_modeset_init() and add a comment about its initialization. This
> is to make it more explicit what the variable is used for.
> 
> Signed-off-by: Jyri Sarha <jsarha@ti.com>
> ---
>  drivers/gpu/drm/omapdrm/omap_drv.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c
> index 17c40aa..3d30f29 100644
> --- a/drivers/gpu/drm/omapdrm/omap_drv.c
> +++ b/drivers/gpu/drm/omapdrm/omap_drv.c
> @@ -320,7 +320,7 @@ static int omap_modeset_init(struct drm_device *dev)
>  	int num_crtcs = 0;
>  	int i, id = 0;
>  	int ret;
> -	u32 possible_crtcs;
> +	u32 possible_crtcs_for_planes;

Maybe "crtc_mask"?

 Tomi
diff mbox

Patch

diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c
index 17c40aa..3d30f29 100644
--- a/drivers/gpu/drm/omapdrm/omap_drv.c
+++ b/drivers/gpu/drm/omapdrm/omap_drv.c
@@ -320,7 +320,7 @@  static int omap_modeset_init(struct drm_device *dev)
 	int num_crtcs = 0;
 	int i, id = 0;
 	int ret;
-	u32 possible_crtcs;
+	u32 possible_crtcs_for_planes;
 
 	drm_mode_config_init(dev);
 
@@ -338,7 +338,8 @@  static int omap_modeset_init(struct drm_device *dev)
 			num_crtcs++;
 
 	num_crtcs = min3(num_crtcs, num_mgrs, num_ovls);
-	possible_crtcs = (1 << num_crtcs) - 1;
+	/* All planes can be put to any CRTC */
+	possible_crtcs_for_planes = (1 << num_crtcs) - 1;
 
 	dssdev = NULL;
 
@@ -401,7 +402,7 @@  static int omap_modeset_init(struct drm_device *dev)
 		 */
 		if (!channel_used(dev, channel)) {
 			ret = omap_modeset_create_crtc(dev, id, channel,
-				possible_crtcs);
+				possible_crtcs_for_planes);
 			if (ret < 0) {
 				dev_err(dev->dev,
 					"could not create CRTC (channel %u)\n",
@@ -420,7 +421,7 @@  static int omap_modeset_init(struct drm_device *dev)
 		struct drm_plane *plane;
 
 		plane = omap_plane_init(dev, id, DRM_PLANE_TYPE_OVERLAY,
-			possible_crtcs);
+			possible_crtcs_for_planes);
 		if (IS_ERR(plane))
 			return PTR_ERR(plane);