Skip to content

Commit 88e0858

Browse files
committed
drm/vc4: Use the helper to retrieve vc4_dev when needed
We have a helper to retrieve the vc4_dev structure from the drm_device one when needed, so let's use it consistently. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Maxime Ripard <maxime@cerno.tech> Link: https://patchwork.freedesktop.org/patch/msgid/20201029190104.2181730-4-maxime@cerno.tech
1 parent 171a072 commit 88e0858

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

drivers/gpu/drm/vc4/vc4_hvs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ static int vc4_hvs_bind(struct device *dev, struct device *master, void *data)
560560
{
561561
struct platform_device *pdev = to_platform_device(dev);
562562
struct drm_device *drm = dev_get_drvdata(master);
563-
struct vc4_dev *vc4 = drm->dev_private;
563+
struct vc4_dev *vc4 = to_vc4_dev(drm);
564564
struct vc4_hvs *hvs = NULL;
565565
int ret;
566566
u32 dispctrl;
@@ -679,7 +679,7 @@ static void vc4_hvs_unbind(struct device *dev, struct device *master,
679679
void *data)
680680
{
681681
struct drm_device *drm = dev_get_drvdata(master);
682-
struct vc4_dev *vc4 = drm->dev_private;
682+
struct vc4_dev *vc4 = to_vc4_dev(drm);
683683
struct vc4_hvs *hvs = vc4->hvs;
684684

685685
if (drm_mm_node_allocated(&vc4->hvs->mitchell_netravali_filter))

drivers/gpu/drm/vc4/vc4_kms.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ static struct vc4_ctm_state *vc4_get_ctm_state(struct drm_atomic_state *state,
5151
struct drm_private_obj *manager)
5252
{
5353
struct drm_device *dev = state->dev;
54-
struct vc4_dev *vc4 = dev->dev_private;
54+
struct vc4_dev *vc4 = to_vc4_dev(dev);
5555
struct drm_private_state *priv_state;
5656
int ret;
5757

0 commit comments

Comments
 (0)