Skip to content

Commit 07f2c94

Browse files
committed
drm/imx: imx-tve: use regmap fast_io spinlock
Replace the custom spinlock with the fast_io spinlock provided by regmap. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
1 parent a28f918 commit 07f2c94

1 file changed

Lines changed: 1 addition & 21 deletions

File tree

drivers/gpu/drm/imx/imx-tve.c

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#include <linux/platform_device.h>
1414
#include <linux/regmap.h>
1515
#include <linux/regulator/consumer.h>
16-
#include <linux/spinlock.h>
1716
#include <linux/videodev2.h>
1817

1918
#include <video/imx-ipu-v3.h>
@@ -104,7 +103,6 @@ struct imx_tve {
104103
struct drm_connector connector;
105104
struct drm_encoder encoder;
106105
struct device *dev;
107-
spinlock_t lock; /* register lock */
108106
bool enabled;
109107
int mode;
110108
int di_hsync_pin;
@@ -129,22 +127,6 @@ static inline struct imx_tve *enc_to_tve(struct drm_encoder *e)
129127
return container_of(e, struct imx_tve, encoder);
130128
}
131129

132-
static void tve_lock(void *__tve)
133-
__acquires(&tve->lock)
134-
{
135-
struct imx_tve *tve = __tve;
136-
137-
spin_lock(&tve->lock);
138-
}
139-
140-
static void tve_unlock(void *__tve)
141-
__releases(&tve->lock)
142-
{
143-
struct imx_tve *tve = __tve;
144-
145-
spin_unlock(&tve->lock);
146-
}
147-
148130
static void tve_enable(struct imx_tve *tve)
149131
{
150132
if (!tve->enabled) {
@@ -500,8 +482,7 @@ static struct regmap_config tve_regmap_config = {
500482

501483
.readable_reg = imx_tve_readable_reg,
502484

503-
.lock = tve_lock,
504-
.unlock = tve_unlock,
485+
.fast_io = true,
505486

506487
.max_register = 0xdc,
507488
};
@@ -544,7 +525,6 @@ static int imx_tve_bind(struct device *dev, struct device *master, void *data)
544525
memset(tve, 0, sizeof(*tve));
545526

546527
tve->dev = dev;
547-
spin_lock_init(&tve->lock);
548528

549529
ddc_node = of_parse_phandle(np, "ddc-i2c-bus", 0);
550530
if (ddc_node) {

0 commit comments

Comments
 (0)