From: Daniel Vetter <daniel@ffwll.ch>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: dri-devel@lists.freedesktop.org,
David Airlie <airlied@redhat.com>,
andr2000@gmail.com, 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 v2 15/15] drm/bochs: reserve bo for pin/unpin
Date: Wed, 9 Jan 2019 11:10:44 +0100 [thread overview]
Message-ID: <20190109101044.GS21184@phenom.ffwll.local> (raw)
In-Reply-To: <20190108112519.27473-16-kraxel@redhat.com>
On Tue, Jan 08, 2019 at 12:25:19PM +0100, Gerd Hoffmann wrote:
> The buffer object must be reserved before calling
> ttm_bo_validate for pinning/unpinning.
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Seems a bit a bisect fumble in your series here: legacy kms code reserved
the ttm bo before calling boch_bo_pin/unpin, your atomic code doesn't. I
think pushing this into bochs_bo_pin/unpin makes sense for atomic, but to
avoid bisect fail I think you need to have these temporarily in your
cleanup/prepare_plane functions too.
Looked through the entire series, this here is the only issue I think
should be fixed before merging (making atomic_enable optional can be done
as a follow-up if you feel like it). With that addressed on the series:
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
> drivers/gpu/drm/bochs/bochs_mm.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/gpu/drm/bochs/bochs_mm.c b/drivers/gpu/drm/bochs/bochs_mm.c
> index cfe061c25f..970a591908 100644
> --- a/drivers/gpu/drm/bochs/bochs_mm.c
> +++ b/drivers/gpu/drm/bochs/bochs_mm.c
> @@ -223,7 +223,11 @@ int bochs_bo_pin(struct bochs_bo *bo, u32 pl_flag)
> bochs_ttm_placement(bo, pl_flag);
> for (i = 0; i < bo->placement.num_placement; i++)
> bo->placements[i].flags |= TTM_PL_FLAG_NO_EVICT;
> + ret = ttm_bo_reserve(&bo->bo, true, false, NULL);
> + if (ret)
> + return ret;
> ret = ttm_bo_validate(&bo->bo, &bo->placement, &ctx);
> + ttm_bo_unreserve(&bo->bo);
> if (ret)
> return ret;
>
> @@ -247,7 +251,11 @@ int bochs_bo_unpin(struct bochs_bo *bo)
>
> for (i = 0; i < bo->placement.num_placement; i++)
> bo->placements[i].flags &= ~TTM_PL_FLAG_NO_EVICT;
> + ret = ttm_bo_reserve(&bo->bo, true, false, NULL);
> + if (ret)
> + return ret;
> ret = ttm_bo_validate(&bo->bo, &bo->placement, &ctx);
> + ttm_bo_unreserve(&bo->bo);
> if (ret)
> return ret;
>
> --
> 2.9.3
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
next prev parent reply other threads:[~2019-01-09 10:10 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190108112519.27473-1-kraxel@redhat.com>
2019-01-08 11:25 ` [PATCH v2 01/15] drm/bochs: encoder cleanup Gerd Hoffmann
2019-01-08 11:25 ` [PATCH v2 02/15] drm/bochs: split bochs_hw_setmode Gerd Hoffmann
2019-01-08 11:25 ` [PATCH v2 03/15] drm/bochs: atomic: add atomic_flush+atomic_enable callbacks Gerd Hoffmann
2019-01-09 10:06 ` Daniel Vetter
2019-01-08 11:25 ` [PATCH v2 04/15] drm/bochs: atomic: add mode_set_nofb callback Gerd Hoffmann
2019-01-08 11:25 ` [PATCH v2 05/15] drm/bochs: atomic: switch planes to atomic, wire up helpers Gerd Hoffmann
2019-01-08 11:25 ` [PATCH v2 06/15] drm/bochs: atomic: use atomic set_config helper Gerd Hoffmann
2019-01-08 11:25 ` [PATCH v2 07/15] drm/bochs: atomic: use atomic page_flip helper Gerd Hoffmann
2019-01-08 11:25 ` [PATCH v2 08/15] drm/bochs: atomic: set DRIVER_ATOMIC Gerd Hoffmann
2019-01-08 11:25 ` [PATCH v2 09/15] drm/bochs: remove old bochs_crtc_* functions Gerd Hoffmann
2019-01-08 11:25 ` [PATCH v2 10/15] drm/bochs: drop unused gpu_addr arg from bochs_bo_pin() Gerd Hoffmann
2019-01-08 11:25 ` [PATCH v2 11/15] drm/bochs: add basic prime support Gerd Hoffmann
2019-01-08 11:25 ` [PATCH v2 12/15] drm/bochs: switch to generic drm fbdev emulation Gerd Hoffmann
2019-01-08 11:25 ` [PATCH v2 13/15] drm/bochs: drop old fbdev emulation code Gerd Hoffmann
2019-01-08 11:25 ` [PATCH v2 14/15] drm/bochs: move remaining fb bits to kms Gerd Hoffmann
2019-01-08 11:25 ` [PATCH v2 15/15] drm/bochs: reserve bo for pin/unpin Gerd Hoffmann
2019-01-09 10:10 ` Daniel Vetter [this message]
2019-01-09 14:54 ` Gerd Hoffmann
2019-01-09 17:35 ` Daniel Vetter
2019-01-09 18:45 ` Alex Deucher
2019-01-09 20:51 ` Gerd Hoffmann
2019-01-09 21:45 ` Daniel Vetter
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=20190109101044.GS21184@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=airlied@linux.ie \
--cc=airlied@redhat.com \
--cc=andr2000@gmail.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