lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1a5a120f-a28d-e965-b1df-3f7139f70b23@gmail.com>
Date:   Thu, 20 Dec 2018 14:46:47 +0200
From:   Oleksandr Andrushchenko <andr2000@...il.com>
To:     Gerd Hoffmann <kraxel@...hat.com>, dri-devel@...ts.freedesktop.org,
        David Airlie <airlied@...hat.com>
Cc:     David Airlie <airlied@...ux.ie>,
        open list <linux-kernel@...r.kernel.org>,
        "open list:DRM DRIVER FOR BOCHS VIRTUAL GPU" 
        <virtualization@...ts.linux-foundation.org>
Subject: Re: [PATCH 09/14] drm/bochs: remove old bochs_crtc_* functions

On 12/19/18 1:51 PM, Gerd Hoffmann wrote:
> Remove the old, now unused crtc callbacks.
>
> Signed-off-by: Gerd Hoffmann <kraxel@...hat.com>
Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@...m.com>
> ---
>   drivers/gpu/drm/bochs/bochs_kms.c | 81 ---------------------------------------
>   1 file changed, 81 deletions(-)
>
> diff --git a/drivers/gpu/drm/bochs/bochs_kms.c b/drivers/gpu/drm/bochs/bochs_kms.c
> index 9e836386e9..85dd268fa1 100644
> --- a/drivers/gpu/drm/bochs/bochs_kms.c
> +++ b/drivers/gpu/drm/bochs/bochs_kms.c
> @@ -20,74 +20,6 @@ MODULE_PARM_DESC(defy, "default y resolution");
>   
>   /* ---------------------------------------------------------------------- */
>   
> -static void bochs_crtc_dpms(struct drm_crtc *crtc, int mode)
> -{
> -	switch (mode) {
> -	case DRM_MODE_DPMS_ON:
> -	case DRM_MODE_DPMS_STANDBY:
> -	case DRM_MODE_DPMS_SUSPEND:
> -	case DRM_MODE_DPMS_OFF:
> -	default:
> -		return;
> -	}
> -}
> -
> -static int bochs_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y,
> -				    struct drm_framebuffer *old_fb)
> -{
> -	struct bochs_device *bochs =
> -		container_of(crtc, struct bochs_device, crtc);
> -	struct bochs_bo *bo;
> -	u64 gpu_addr = 0;
> -	int ret;
> -
> -	if (old_fb) {
> -		bo = gem_to_bochs_bo(old_fb->obj[0]);
> -		ret = ttm_bo_reserve(&bo->bo, true, false, NULL);
> -		if (ret) {
> -			DRM_ERROR("failed to reserve old_fb bo\n");
> -		} else {
> -			bochs_bo_unpin(bo);
> -			ttm_bo_unreserve(&bo->bo);
> -		}
> -	}
> -
> -	if (WARN_ON(crtc->primary->fb == NULL))
> -		return -EINVAL;
> -
> -	bo = gem_to_bochs_bo(crtc->primary->fb->obj[0]);
> -	ret = ttm_bo_reserve(&bo->bo, true, false, NULL);
> -	if (ret)
> -		return ret;
> -
> -	ret = bochs_bo_pin(bo, TTM_PL_FLAG_VRAM, &gpu_addr);
> -	if (ret) {
> -		ttm_bo_unreserve(&bo->bo);
> -		return ret;
> -	}
> -
> -	ttm_bo_unreserve(&bo->bo);
> -	bochs_hw_setbase(bochs, x, y, gpu_addr);
> -	return 0;
> -}
> -
> -static int bochs_crtc_mode_set(struct drm_crtc *crtc,
> -			       struct drm_display_mode *mode,
> -			       struct drm_display_mode *adjusted_mode,
> -			       int x, int y, struct drm_framebuffer *old_fb)
> -{
> -	struct bochs_device *bochs =
> -		container_of(crtc, struct bochs_device, crtc);
> -
> -	if (WARN_ON(crtc->primary->fb == NULL))
> -		return -EINVAL;
> -
> -	bochs_hw_setmode(bochs, mode);
> -	bochs_hw_setformat(bochs, crtc->primary->fb->format);
> -	bochs_crtc_mode_set_base(crtc, x, y, old_fb);
> -	return 0;
> -}
> -
>   static void bochs_crtc_mode_set_nofb(struct drm_crtc *crtc)
>   {
>   	struct bochs_device *bochs =
> @@ -96,14 +28,6 @@ static void bochs_crtc_mode_set_nofb(struct drm_crtc *crtc)
>   	bochs_hw_setmode(bochs, &crtc->mode);
>   }
>   
> -static void bochs_crtc_prepare(struct drm_crtc *crtc)
> -{
> -}
> -
> -static void bochs_crtc_commit(struct drm_crtc *crtc)
> -{
> -}
> -
>   static void bochs_crtc_atomic_enable(struct drm_crtc *crtc,
>   				     struct drm_crtc_state *old_crtc_state)
>   {
> @@ -138,12 +62,7 @@ static const struct drm_crtc_funcs bochs_crtc_funcs = {
>   };
>   
>   static const struct drm_crtc_helper_funcs bochs_helper_funcs = {
> -	.dpms = bochs_crtc_dpms,
> -	.mode_set = bochs_crtc_mode_set,
> -	.mode_set_base = bochs_crtc_mode_set_base,
>   	.mode_set_nofb = bochs_crtc_mode_set_nofb,
> -	.prepare = bochs_crtc_prepare,
> -	.commit = bochs_crtc_commit,
>   	.atomic_enable = bochs_crtc_atomic_enable,
>   	.atomic_flush = bochs_crtc_atomic_flush,
>   };

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ