mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Oleksandr Andrushchenko <andr2000@gmail.com>
To: Gerd Hoffmann <kraxel@redhat.com>,
	dri-devel@lists.freedesktop.org,
	David Airlie <airlied@redhat.com>
Cc: David Airlie <airlied@linux.ie>,
	open list <linux-kernel@vger.kernel.org>,
	"open list:DRM DRIVER FOR BOCHS VIRTUAL GPU" 
	<virtualization@lists.linux-foundation.org>
Subject: Re: [PATCH 10/14] drm/bochs: drop unused gpu_addr arg from bochs_bo_pin()
Date: Thu, 20 Dec 2018 14:54:15 +0200	[thread overview]
Message-ID: <0db5ad72-0f53-8f54-5656-2a3ad64dce72@gmail.com> (raw)
In-Reply-To: <20181219115127.31359-11-kraxel@redhat.com>

On 12/19/18 1:51 PM, Gerd Hoffmann wrote:
> It's always NULL, so just remove it.
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
> ---
>   drivers/gpu/drm/bochs/bochs.h       |  2 +-
>   drivers/gpu/drm/bochs/bochs_fbdev.c |  2 +-
>   drivers/gpu/drm/bochs/bochs_kms.c   |  2 +-
>   drivers/gpu/drm/bochs/bochs_mm.c    | 11 +----------
>   4 files changed, 4 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/gpu/drm/bochs/bochs.h b/drivers/gpu/drm/bochs/bochs.h
> index 4dc1b6384e..d0d474e06f 100644
> --- a/drivers/gpu/drm/bochs/bochs.h
> +++ b/drivers/gpu/drm/bochs/bochs.h
> @@ -142,7 +142,7 @@ int bochs_dumb_create(struct drm_file *file, struct drm_device *dev,
>   int bochs_dumb_mmap_offset(struct drm_file *file, struct drm_device *dev,
>   			   uint32_t handle, uint64_t *offset);
>   
> -int bochs_bo_pin(struct bochs_bo *bo, u32 pl_flag, u64 *gpu_addr);
> +int bochs_bo_pin(struct bochs_bo *bo, u32 pl_flag);
>   int bochs_bo_unpin(struct bochs_bo *bo);
>   
>   /* bochs_kms.c */
> diff --git a/drivers/gpu/drm/bochs/bochs_fbdev.c b/drivers/gpu/drm/bochs/bochs_fbdev.c
> index d9f3d42999..92feb817ff 100644
> --- a/drivers/gpu/drm/bochs/bochs_fbdev.c
> +++ b/drivers/gpu/drm/bochs/bochs_fbdev.c
> @@ -81,7 +81,7 @@ static int bochsfb_create(struct drm_fb_helper *helper,
>   	if (ret)
>   		return ret;
>   
> -	ret = bochs_bo_pin(bo, TTM_PL_FLAG_VRAM, NULL);
> +	ret = bochs_bo_pin(bo, TTM_PL_FLAG_VRAM);
>   	if (ret) {
>   		DRM_ERROR("failed to pin fbcon\n");
>   		ttm_bo_unreserve(&bo->bo);
> diff --git a/drivers/gpu/drm/bochs/bochs_kms.c b/drivers/gpu/drm/bochs/bochs_kms.c
> index 85dd268fa1..a1a0129f3e 100644
> --- a/drivers/gpu/drm/bochs/bochs_kms.c
> +++ b/drivers/gpu/drm/bochs/bochs_kms.c
> @@ -96,7 +96,7 @@ static int bochs_plane_prepare_fb(struct drm_plane *plane,
>   	if (!new_state->fb)
>   		return 0;
>   	bo = gem_to_bochs_bo(new_state->fb->obj[0]);
> -	return bochs_bo_pin(bo, TTM_PL_FLAG_VRAM, NULL);
> +	return bochs_bo_pin(bo, TTM_PL_FLAG_VRAM);
>   }
>   
>   static void bochs_plane_cleanup_fb(struct drm_plane *plane,
> diff --git a/drivers/gpu/drm/bochs/bochs_mm.c b/drivers/gpu/drm/bochs/bochs_mm.c
> index 0980411e41..5a0e092847 100644
> --- a/drivers/gpu/drm/bochs/bochs_mm.c
> +++ b/drivers/gpu/drm/bochs/bochs_mm.c
> @@ -210,20 +210,13 @@ static void bochs_ttm_placement(struct bochs_bo *bo, int domain)
>   	bo->placement.num_busy_placement = c;
>   }
>   
> -static inline u64 bochs_bo_gpu_offset(struct bochs_bo *bo)
> -{
> -	return bo->bo.offset;
> -}
> -
> -int bochs_bo_pin(struct bochs_bo *bo, u32 pl_flag, u64 *gpu_addr)
> +int bochs_bo_pin(struct bochs_bo *bo, u32 pl_flag)
>   {
>   	struct ttm_operation_ctx ctx = { false, false };
>   	int i, ret;
>   
>   	if (bo->pin_count) {
>   		bo->pin_count++;
> -		if (gpu_addr)
> -			*gpu_addr = bochs_bo_gpu_offset(bo);
>   		return 0;
>   	}
>   
> @@ -235,8 +228,6 @@ int bochs_bo_pin(struct bochs_bo *bo, u32 pl_flag, u64 *gpu_addr)
>   		return ret;
>   
>   	bo->pin_count = 1;
> -	if (gpu_addr)
> -		*gpu_addr = bochs_bo_gpu_offset(bo);
>   	return 0;
>   }
>   


  reply	other threads:[~2018-12-20 12:54 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20181219115127.31359-1-kraxel@redhat.com>
2018-12-19 11:51 ` [PATCH 01/14] drm/bochs: encoder cleanup Gerd Hoffmann
2018-12-19 14:43   ` Oleksandr Andrushchenko
2018-12-19 11:51 ` [PATCH 02/14] drm/bochs: split bochs_hw_setmode Gerd Hoffmann
2018-12-19 15:10   ` Oleksandr Andrushchenko
2018-12-19 11:51 ` [PATCH 03/14] drm/bochs: atomic: add atomic_flush+atomic_enable callbacks Gerd Hoffmann
2018-12-19 15:30   ` Oleksandr Andrushchenko
2018-12-19 11:51 ` [PATCH 04/14] drm/bochs: atomic: add mode_set_nofb callback Gerd Hoffmann
2018-12-20 12:08   ` Oleksandr Andrushchenko
2018-12-19 11:51 ` [PATCH 05/14] drm/bochs: atomic: switch planes to atomic, wire up helpers Gerd Hoffmann
2018-12-20 12:14   ` Oleksandr Andrushchenko
2018-12-19 11:51 ` [PATCH 06/14] drm/bochs: atomic: use atomic set_config helper Gerd Hoffmann
2018-12-20 12:14   ` Oleksandr Andrushchenko
2018-12-19 11:51 ` [PATCH 07/14] drm/bochs: atomic: use atomic page_flip helper Gerd Hoffmann
2018-12-20 12:34   ` Oleksandr Andrushchenko
2018-12-19 11:51 ` [PATCH 08/14] drm/bochs: atomic: set DRIVER_ATOMIC Gerd Hoffmann
2018-12-20 12:34   ` Oleksandr Andrushchenko
2018-12-19 11:51 ` [PATCH 09/14] drm/bochs: remove old bochs_crtc_* functions Gerd Hoffmann
2018-12-20 12:46   ` Oleksandr Andrushchenko
2018-12-19 11:51 ` [PATCH 10/14] drm/bochs: drop unused gpu_addr arg from bochs_bo_pin() Gerd Hoffmann
2018-12-20 12:54   ` Oleksandr Andrushchenko [this message]
2018-12-19 11:51 ` [PATCH 11/14] drm/bochs: add basic prime support Gerd Hoffmann
2018-12-20 13:07   ` Oleksandr Andrushchenko
2018-12-19 11:51 ` [PATCH 12/14] drm/bochs: switch to generic drm fbdev emulation Gerd Hoffmann
2018-12-20 13:15   ` Oleksandr Andrushchenko
2018-12-19 11:51 ` [PATCH 13/14] drm/bochs: drop old fbdev emulation code Gerd Hoffmann
2018-12-20 13:16   ` Oleksandr Andrushchenko
2018-12-19 11:51 ` [PATCH 14/14] drm/bochs: move remaining fb bits to kms Gerd Hoffmann
2018-12-20 13:17   ` Oleksandr Andrushchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0db5ad72-0f53-8f54-5656-2a3ad64dce72@gmail.com \
    --to=andr2000@gmail.com \
    --cc=airlied@linux.ie \
    --cc=airlied@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kraxel@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome