[PATCH 1/2] drm: handle cursor_set2 in restore_fbdev_mode

Christian König deathsimple at vodafone.de
Wed Sep 30 12:04:36 PDT 2015


On 30.09.2015 20:47, Alex Deucher wrote:
> If a driver uses the cursor_set2 crtc callback rather than
> cursor_set, use that.  This fixes the fbdev helper for drivers
> that use cursor_set2.
>
> Change-Id: I127d3f8e72789ba70c3648140f87c6187864e130
> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>

I'm not very familiar with the code, but that looks like it makes sense.

Both patches are Reviewed-by: Christian König <christian.koenig at amd.com>

> ---
>   drivers/gpu/drm/drm_fb_helper.c | 6 +++++-
>   1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> index 418d299..ca08c47 100644
> --- a/drivers/gpu/drm/drm_fb_helper.c
> +++ b/drivers/gpu/drm/drm_fb_helper.c
> @@ -345,7 +345,11 @@ static bool restore_fbdev_mode(struct drm_fb_helper *fb_helper)
>   		struct drm_crtc *crtc = mode_set->crtc;
>   		int ret;
>   
> -		if (crtc->funcs->cursor_set) {
> +		if (crtc->funcs->cursor_set2) {
> +			ret = crtc->funcs->cursor_set2(crtc, NULL, 0, 0, 0, 0, 0);
> +			if (ret)
> +				error = true;
> +		} else if (crtc->funcs->cursor_set) {
>   			ret = crtc->funcs->cursor_set(crtc, NULL, 0, 0, 0);
>   			if (ret)
>   				error = true;



More information about the dri-devel mailing list