Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d0165407 authored by Russell King's avatar Russell King
Browse files

drm/armada: use number of CRTCs registered



Use the number of CRTCs registered to size the vblank arrays rather than
our own count.  Number CRTCs using this as well.  This permits us to
register CRTCs as components in the near future rather than as part of a
single device.

Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent e5d9ddfb
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1050,8 +1050,8 @@ static int armada_drm_crtc_create_properties(struct drm_device *dev)
	return 0;
}

int armada_drm_crtc_create(struct drm_device *dev, unsigned num,
	struct resource *res, int irq)
int armada_drm_crtc_create(struct drm_device *dev, struct resource *res,
	int irq)
{
	struct armada_private *priv = dev->dev_private;
	struct armada_crtc *dcrtc;
@@ -1075,7 +1075,7 @@ int armada_drm_crtc_create(struct drm_device *dev, unsigned num,
	}

	dcrtc->base = base;
	dcrtc->num = num;
	dcrtc->num = dev->mode_config.num_crtc;
	dcrtc->clk = ERR_PTR(-EINVAL);
	dcrtc->csc_yuv_mode = CSC_AUTO;
	dcrtc->csc_rgb_mode = CSC_AUTO;
+1 −2
Original line number Diff line number Diff line
@@ -72,8 +72,7 @@ struct armada_crtc {
};
#define drm_to_armada_crtc(c) container_of(c, struct armada_crtc, crtc)

int armada_drm_crtc_create(struct drm_device *, unsigned, struct resource *,
	int);
int armada_drm_crtc_create(struct drm_device *, struct resource *, int);
void armada_drm_crtc_gamma_set(struct drm_crtc *, u16, u16, u16, int);
void armada_drm_crtc_gamma_get(struct drm_crtc *, u16 *, u16 *, u16 *, int);
void armada_drm_crtc_disable_irq(struct armada_crtc *, u32);
+2 −2
Original line number Diff line number Diff line
@@ -164,7 +164,7 @@ static int armada_drm_load(struct drm_device *dev, unsigned long flags)
		if (irq < 0)
			goto err_kms;

		ret = armada_drm_crtc_create(dev, n, res[n], irq);
		ret = armada_drm_crtc_create(dev, res[n], irq);
		if (ret)
			goto err_kms;
	}
@@ -175,7 +175,7 @@ static int armada_drm_load(struct drm_device *dev, unsigned long flags)
		goto err_kms;
#endif

	ret = drm_vblank_init(dev, n);
	ret = drm_vblank_init(dev, dev->mode_config.num_crtc);
	if (ret)
		goto err_kms;