diff options
| author | Mark Brown <broonie@kernel.org> | 2020-12-28 17:20:00 +0300 | 
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2020-12-28 17:20:00 +0300 | 
| commit | 2ae6f64ce1ce304b502461fdfe0b96c8171ae2cc (patch) | |
| tree | 88e987c447daf2c29e2d4c15e58d1029b0cc78c2 /drivers/gpu/drm/drm_crtc.c | |
| parent | 3b66e4a8e58a85af3212c7117d7a29c9ef6679a2 (diff) | |
| parent | 5c8fe583cce542aa0b84adc939ce85293de36e5e (diff) | |
| download | linux-2ae6f64ce1ce304b502461fdfe0b96c8171ae2cc.tar.xz | |
Merge tag 'v5.11-rc1' into regulator-5.11
Linux 5.11-rc1
Diffstat (limited to 'drivers/gpu/drm/drm_crtc.c')
| -rw-r--r-- | drivers/gpu/drm/drm_crtc.c | 40 | 
1 files changed, 40 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index aecdd7ea26dc..74090fc3aa55 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -229,6 +229,15 @@ struct dma_fence *drm_crtc_create_fence(struct drm_crtc *crtc)   * 	user-space must set this property to 0.   *   * 	Setting MODE_ID to 0 will release reserved resources for the CRTC. + * SCALING_FILTER: + * 	Atomic property for setting the scaling filter for CRTC scaler + * + * 	The value of this property can be one of the following: + * + * 	Default: + * 		Driver's default scaling filter + * 	Nearest Neighbor: + * 		Nearest Neighbor scaling filter   */  /** @@ -774,3 +783,34 @@ int drm_mode_crtc_set_obj_prop(struct drm_mode_object *obj,  	return ret;  } + +/** + * drm_crtc_create_scaling_filter_property - create a new scaling filter + * property + * + * @crtc: drm CRTC + * @supported_filters: bitmask of supported scaling filters, must include + *		       BIT(DRM_SCALING_FILTER_DEFAULT). + * + * This function lets driver to enable the scaling filter property on a given + * CRTC. + * + * RETURNS: + * Zero for success or -errno + */ +int drm_crtc_create_scaling_filter_property(struct drm_crtc *crtc, +					    unsigned int supported_filters) +{ +	struct drm_property *prop = +		drm_create_scaling_filter_prop(crtc->dev, supported_filters); + +	if (IS_ERR(prop)) +		return PTR_ERR(prop); + +	drm_object_attach_property(&crtc->base, prop, +				   DRM_SCALING_FILTER_DEFAULT); +	crtc->scaling_filter_property = prop; + +	return 0; +} +EXPORT_SYMBOL(drm_crtc_create_scaling_filter_property);  | 
