[PATCH 14/14] drm/vc4: Warn if some v3d code is run on BCM2711

Maxime Ripard maxime at cerno.tech
Tue May 31 09:40:11 UTC 2022


Hi Melissa,

On Mon, May 09, 2022 at 03:52:04PM -0100, Melissa Wen wrote:
> > @@ -915,10 +954,14 @@ int vc4_set_tiling_ioctl(struct drm_device *dev, void *data,
> >  int vc4_get_tiling_ioctl(struct drm_device *dev, void *data,
> >  			 struct drm_file *file_priv)
> >  {
> > +	struct vc4_dev *vc4 = to_vc4_dev(dev);
> >  	struct drm_vc4_get_tiling *args = data;
> >  	struct drm_gem_object *gem_obj;
> >  	struct vc4_bo *bo;
> >  
> > +	if (WARN_ON_ONCE(vc4->is_vc5))
> > +		return -ENODEV;
> > +
> 
> Just to confirm: as none of these ioctls were wired up in
> vc5_drm_driver, is there any situation where this path can be taken
> wrongly?

For this particular function, no, it wasn't reachable before since the
ioctl were only exposed for devices with the render capability, and we
were not using it.

Other functions in that patch however are called prior to this series,
especially in the BO/GEM related path.

Maxime


More information about the dri-devel mailing list