From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 87362C4727E for ; Wed, 30 Sep 2020 09:47:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 25C6D207C3 for ; Wed, 30 Sep 2020 09:47:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="YslZyjVo" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728951AbgI3JrS (ORCPT ); Wed, 30 Sep 2020 05:47:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728655AbgI3JrS (ORCPT ); Wed, 30 Sep 2020 05:47:18 -0400 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE1FCC0613D0 for ; Wed, 30 Sep 2020 02:47:17 -0700 (PDT) Received: by mail-wm1-x343.google.com with SMTP id e11so860384wme.0 for ; Wed, 30 Sep 2020 02:47:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=mk/10QMoJ+o57Gs0uKBi5jqLBb5COb+Y9kF4IXUlM/Q=; b=YslZyjVoOldROC3jA1fPKGoa2j+xP9ZMNK4SZUeZjFZmxDgc83XfrocubX8z+Ghi0i mxxZbyYhvNo/yzlGV7M9TYWiI6ebmWI5MPFUrLdFH5HEq/1glgvLqigSOT2sZCqvNTzQ 5j2dQDwMw2raEHsSORmptJcNQAmWyQj8NQX/A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=mk/10QMoJ+o57Gs0uKBi5jqLBb5COb+Y9kF4IXUlM/Q=; b=Zh4ZTnfpmOy6Qb1kDejn0E4E70m1dE/fEbis3CXpyQlsKGIfB/yB43DIJa4F1wy/XC zHuoFdhCTbNfY/8xO/s1wRfxhSiWSHtaea+I8jC0DaNAtK/9dF7U0+sNBsfU7yD/IfQ5 IR8nS+J1F3vPdFfWPQS3SUGqPmly5oXIVBdFMnCMy5OBz95/0F9lo76dV47z8A3KAbsI DAY4SJx6DlNbFDwM7T969bp2LceuNA9t++k/NC+4ZEMSMd+y07gjHX5oTLbb7vPjks1z 3wdkcIcual/wAqn6fFNlRZyFylLU8oUKSkMAucIk8JubEQlW9vcfs0/QHaR9if5eEPK5 qw/A== X-Gm-Message-State: AOAM5339WfBSsjCPmRfYQnlcl/VHjfvuo9irgvsbLv7gX3oE5C5IgVNF gomHlpdRj/1TC7LHKFZU51V+BQ== X-Google-Smtp-Source: ABdhPJy8QqpQoBX6MWQ3S7YZuW9WMNYB4GRIEped2k61Hp3lacYf00Zpjbck3DpWjhDxW2rcxoc68Q== X-Received: by 2002:a1c:98d8:: with SMTP id a207mr1952908wme.157.1601459236371; Wed, 30 Sep 2020 02:47:16 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id n6sm1769842wmd.22.2020.09.30.02.47.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Sep 2020 02:47:15 -0700 (PDT) Date: Wed, 30 Sep 2020 11:47:12 +0200 From: Daniel Vetter To: christian.koenig@amd.com Cc: Thomas Zimmermann , maarten.lankhorst@linux.intel.com, mripard@kernel.org, airlied@linux.ie, daniel@ffwll.ch, sam@ravnborg.org, alexander.deucher@amd.com, kraxel@redhat.com, l.stach@pengutronix.de, linux+etnaviv@armlinux.org.uk, christian.gmeiner@gmail.com, inki.dae@samsung.com, jy0922.shim@samsung.com, sw0312.kim@samsung.com, kyungmin.park@samsung.com, kgene@kernel.org, krzk@kernel.org, yuq825@gmail.com, bskeggs@redhat.com, robh@kernel.org, tomeu.vizoso@collabora.com, steven.price@arm.com, alyssa.rosenzweig@collabora.com, hjc@rock-chips.com, heiko@sntech.de, hdegoede@redhat.com, sean@poorly.run, eric@anholt.net, oleksandr_andrushchenko@epam.com, ray.huang@amd.com, sumit.semwal@linaro.org, emil.velikov@collabora.com, luben.tuikov@amd.com, apaneers@amd.com, linus.walleij@linaro.org, melissa.srw@gmail.com, chris@chris-wilson.co.uk, miaoqinglang@huawei.com, linux-samsung-soc@vger.kernel.org, lima@lists.freedesktop.org, nouveau@lists.freedesktop.org, etnaviv@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, virtualization@lists.linux-foundation.org, linaro-mm-sig@lists.linaro.org, linux-rockchip@lists.infradead.org, dri-devel@lists.freedesktop.org, spice-devel@lists.freedesktop.org, xen-devel@lists.xenproject.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Subject: Re: [PATCH v3 2/7] drm/ttm: Add ttm_kmap_obj_to_dma_buf_map() for type conversion Message-ID: <20200930094712.GW438822@phenom.ffwll.local> References: <20200929151437.19717-1-tzimmermann@suse.de> <20200929151437.19717-3-tzimmermann@suse.de> <8fad0114-064a-4ed5-c21d-d1b4294de0a1@amd.com> <2614314a-81f7-4722-c400-68d90e48e09a@suse.de> <8a84f62b-33f3-f44c-52af-c859a0e0d1fb@gmail.com> <07972ada-9135-3743-a86b-487f610c509f@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Operating-System: Linux phenom 5.7.0-1-amd64 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org On Wed, Sep 30, 2020 at 10:34:31AM +0200, Christian König wrote: > Am 30.09.20 um 10:19 schrieb Thomas Zimmermann: > > Hi > > > > Am 30.09.20 um 10:05 schrieb Christian König: > > > Am 29.09.20 um 19:49 schrieb Thomas Zimmermann: > > > > Hi Christian > > > > > > > > Am 29.09.20 um 17:35 schrieb Christian König: > > > > > Am 29.09.20 um 17:14 schrieb Thomas Zimmermann: > > > > > > The new helper ttm_kmap_obj_to_dma_buf() extracts address and location > > > > > > from and instance of TTM's kmap_obj and initializes struct dma_buf_map > > > > > > with these values. Helpful for TTM-based drivers. > > > > > We could completely drop that if we use the same structure inside TTM as > > > > > well. > > > > > > > > > > Additional to that which driver is going to use this? > > > > As Daniel mentioned, it's in patch 3. The TTM-based drivers will > > > > retrieve the pointer via this function. > > > > > > > > I do want to see all that being more tightly integrated into TTM, but > > > > not in this series. This one is about fixing the bochs-on-sparc64 > > > > problem for good. Patch 7 adds an update to TTM to the DRM TODO list. > > > I should have asked which driver you try to fix here :) > > > > > > In this case just keep the function inside bochs and only fix it there. > > > > > > All other drivers can be fixed when we generally pump this through TTM. > > Did you take a look at patch 3? This function will be used by VRAM > > helpers, nouveau, radeon, amdgpu and qxl. If we don't put it here, we > > have to duplicate the functionality in each if these drivers. Bochs > > itself uses VRAM helpers and doesn't touch the function directly. > > Ah, ok can we have that then only in the VRAM helpers? > > Alternative you could go ahead and use dma_buf_map in ttm_bo_kmap_obj > directly and drop the hack with the TTM_BO_MAP_IOMEM_MASK. > > What I want to avoid is to have another conversion function in TTM because > what happens here is that we already convert from ttm_bus_placement to > ttm_bo_kmap_obj and then to dma_buf_map. Hm I'm not really seeing how that helps with a gradual conversion of everything over to dma_buf_map and assorted helpers for access? There's too many places in ttm drivers where is_iomem and related stuff is used to be able to convert it all in one go. An intermediate state with a bunch of conversions seems fairly unavoidable to me. -Daniel > > Thanks, > Christian. > > > > > Best regards > > Thomas > > > > > Regards, > > > Christian. > > > > > > > Best regards > > > > Thomas > > > > > > > > > Regards, > > > > > Christian. > > > > > > > > > > > Signed-off-by: Thomas Zimmermann > > > > > > --- > > > > > >   include/drm/ttm/ttm_bo_api.h | 24 ++++++++++++++++++++++++ > > > > > >   include/linux/dma-buf-map.h  | 20 ++++++++++++++++++++ > > > > > >   2 files changed, 44 insertions(+) > > > > > > > > > > > > diff --git a/include/drm/ttm/ttm_bo_api.h b/include/drm/ttm/ttm_bo_api.h > > > > > > index c96a25d571c8..62d89f05a801 100644 > > > > > > --- a/include/drm/ttm/ttm_bo_api.h > > > > > > +++ b/include/drm/ttm/ttm_bo_api.h > > > > > > @@ -34,6 +34,7 @@ > > > > > >   #include > > > > > >   #include > > > > > >   #include > > > > > > +#include > > > > > >   #include > > > > > >   #include > > > > > >   #include > > > > > > @@ -486,6 +487,29 @@ static inline void *ttm_kmap_obj_virtual(struct > > > > > > ttm_bo_kmap_obj *map, > > > > > >       return map->virtual; > > > > > >   } > > > > > >   +/** > > > > > > + * ttm_kmap_obj_to_dma_buf_map > > > > > > + * > > > > > > + * @kmap: A struct ttm_bo_kmap_obj returned from ttm_bo_kmap. > > > > > > + * @map: Returns the mapping as struct dma_buf_map > > > > > > + * > > > > > > + * Converts struct ttm_bo_kmap_obj to struct dma_buf_map. If the memory > > > > > > + * is not mapped, the returned mapping is initialized to NULL. > > > > > > + */ > > > > > > +static inline void ttm_kmap_obj_to_dma_buf_map(struct ttm_bo_kmap_obj > > > > > > *kmap, > > > > > > +                           struct dma_buf_map *map) > > > > > > +{ > > > > > > +    bool is_iomem; > > > > > > +    void *vaddr = ttm_kmap_obj_virtual(kmap, &is_iomem); > > > > > > + > > > > > > +    if (!vaddr) > > > > > > +        dma_buf_map_clear(map); > > > > > > +    else if (is_iomem) > > > > > > +        dma_buf_map_set_vaddr_iomem(map, (void __force __iomem *)vaddr); > > > > > > +    else > > > > > > +        dma_buf_map_set_vaddr(map, vaddr); > > > > > > +} > > > > > > + > > > > > >   /** > > > > > >    * ttm_bo_kmap > > > > > >    * > > > > > > diff --git a/include/linux/dma-buf-map.h b/include/linux/dma-buf-map.h > > > > > > index fd1aba545fdf..2e8bbecb5091 100644 > > > > > > --- a/include/linux/dma-buf-map.h > > > > > > +++ b/include/linux/dma-buf-map.h > > > > > > @@ -45,6 +45,12 @@ > > > > > >    * > > > > > >    *    dma_buf_map_set_vaddr(&map. 0xdeadbeaf); > > > > > >    * > > > > > > + * To set an address in I/O memory, use dma_buf_map_set_vaddr_iomem(). > > > > > > + * > > > > > > + * .. code-block:: c > > > > > > + * > > > > > > + *    dma_buf_map_set_vaddr_iomem(&map. 0xdeadbeaf); > > > > > > + * > > > > > >    * Test if a mapping is valid with either dma_buf_map_is_set() or > > > > > >    * dma_buf_map_is_null(). > > > > > >    * > > > > > > @@ -118,6 +124,20 @@ static inline void dma_buf_map_set_vaddr(struct > > > > > > dma_buf_map *map, void *vaddr) > > > > > >       map->is_iomem = false; > > > > > >   } > > > > > >   +/** > > > > > > + * dma_buf_map_set_vaddr_iomem - Sets a dma-buf mapping structure to > > > > > > an address in I/O memory > > > > > > + * @map:        The dma-buf mapping structure > > > > > > + * @vaddr_iomem:    An I/O-memory address > > > > > > + * > > > > > > + * Sets the address and the I/O-memory flag. > > > > > > + */ > > > > > > +static inline void dma_buf_map_set_vaddr_iomem(struct dma_buf_map *map, > > > > > > +                           void __iomem *vaddr_iomem) > > > > > > +{ > > > > > > +    map->vaddr_iomem = vaddr_iomem; > > > > > > +    map->is_iomem = true; > > > > > > +} > > > > > > + > > > > > >   /** > > > > > >    * dma_buf_map_is_equal - Compares two dma-buf mapping structures > > > > > > for equality > > > > > >    * @lhs:    The dma-buf mapping structure > > > > > _______________________________________________ > > > > > dri-devel mailing list > > > > > dri-devel@lists.freedesktop.org > > > > > https://lists.freedesktop.org/mailman/listinfo/dri-devel > > > > _______________________________________________ > > > > amd-gfx mailing list > > > > amd-gfx@lists.freedesktop.org > > > > https://lists.freedesktop.org/mailman/listinfo/amd-gfx > > > > > > _______________________________________________ > > > dri-devel mailing list > > > dri-devel@lists.freedesktop.org > > > https://lists.freedesktop.org/mailman/listinfo/dri-devel > > > > > > > _______________________________________________ > > amd-gfx mailing list > > amd-gfx@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/amd-gfx > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH v3 2/7] drm/ttm: Add ttm_kmap_obj_to_dma_buf_map() for type conversion Date: Wed, 30 Sep 2020 11:47:12 +0200 Message-ID: <20200930094712.GW438822@phenom.ffwll.local> References: <20200929151437.19717-1-tzimmermann@suse.de> <20200929151437.19717-3-tzimmermann@suse.de> <8fad0114-064a-4ed5-c21d-d1b4294de0a1@amd.com> <2614314a-81f7-4722-c400-68d90e48e09a@suse.de> <8a84f62b-33f3-f44c-52af-c859a0e0d1fb@gmail.com> <07972ada-9135-3743-a86b-487f610c509f@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Return-path: Content-Disposition: inline In-Reply-To: To: christian.koenig@amd.com Cc: Thomas Zimmermann , maarten.lankhorst@linux.intel.com, mripard@kernel.org, airlied@linux.ie, daniel@ffwll.ch, sam@ravnborg.org, alexander.deucher@amd.com, kraxel@redhat.com, l.stach@pengutronix.de, linux+etnaviv@armlinux.org.uk, christian.gmeiner@gmail.com, inki.dae@samsung.com, jy0922.shim@samsung.com, sw0312.kim@samsung.com, kyungmin.park@samsung.com, kgene@kernel.org, krzk@kernel.org, yuq825@gmail.com, bskeggs@redhat.com, robh@kernel.org, tomeu.vizoso@collabora.com, steven.price@arm.com, alyssa.rosenzweig@collabora.com, hjc@rock-chips.com, heiko@sntech.de, hdegoede@redhat.com, sean@poorly.run, eric@anholt.net, oleksandr_andrushchenko@epam.com, ray.huang@amd.com, sumit.semwal@linaro.org, emil.velikov@collabora.com, luben.tuikov@amd.com, apaneers@amd.c List-Id: nouveau.vger.kernel.org On Wed, Sep 30, 2020 at 10:34:31AM +0200, Christian König wrote: > Am 30.09.20 um 10:19 schrieb Thomas Zimmermann: > > Hi > > > > Am 30.09.20 um 10:05 schrieb Christian König: > > > Am 29.09.20 um 19:49 schrieb Thomas Zimmermann: > > > > Hi Christian > > > > > > > > Am 29.09.20 um 17:35 schrieb Christian König: > > > > > Am 29.09.20 um 17:14 schrieb Thomas Zimmermann: > > > > > > The new helper ttm_kmap_obj_to_dma_buf() extracts address and location > > > > > > from and instance of TTM's kmap_obj and initializes struct dma_buf_map > > > > > > with these values. Helpful for TTM-based drivers. > > > > > We could completely drop that if we use the same structure inside TTM as > > > > > well. > > > > > > > > > > Additional to that which driver is going to use this? > > > > As Daniel mentioned, it's in patch 3. The TTM-based drivers will > > > > retrieve the pointer via this function. > > > > > > > > I do want to see all that being more tightly integrated into TTM, but > > > > not in this series. This one is about fixing the bochs-on-sparc64 > > > > problem for good. Patch 7 adds an update to TTM to the DRM TODO list. > > > I should have asked which driver you try to fix here :) > > > > > > In this case just keep the function inside bochs and only fix it there. > > > > > > All other drivers can be fixed when we generally pump this through TTM. > > Did you take a look at patch 3? This function will be used by VRAM > > helpers, nouveau, radeon, amdgpu and qxl. If we don't put it here, we > > have to duplicate the functionality in each if these drivers. Bochs > > itself uses VRAM helpers and doesn't touch the function directly. > > Ah, ok can we have that then only in the VRAM helpers? > > Alternative you could go ahead and use dma_buf_map in ttm_bo_kmap_obj > directly and drop the hack with the TTM_BO_MAP_IOMEM_MASK. > > What I want to avoid is to have another conversion function in TTM because > what happens here is that we already convert from ttm_bus_placement to > ttm_bo_kmap_obj and then to dma_buf_map. Hm I'm not really seeing how that helps with a gradual conversion of everything over to dma_buf_map and assorted helpers for access? There's too many places in ttm drivers where is_iomem and related stuff is used to be able to convert it all in one go. An intermediate state with a bunch of conversions seems fairly unavoidable to me. -Daniel > > Thanks, > Christian. > > > > > Best regards > > Thomas > > > > > Regards, > > > Christian. > > > > > > > Best regards > > > > Thomas > > > > > > > > > Regards, > > > > > Christian. > > > > > > > > > > > Signed-off-by: Thomas Zimmermann > > > > > > --- > > > > > >   include/drm/ttm/ttm_bo_api.h | 24 ++++++++++++++++++++++++ > > > > > >   include/linux/dma-buf-map.h  | 20 ++++++++++++++++++++ > > > > > >   2 files changed, 44 insertions(+) > > > > > > > > > > > > diff --git a/include/drm/ttm/ttm_bo_api.h b/include/drm/ttm/ttm_bo_api.h > > > > > > index c96a25d571c8..62d89f05a801 100644 > > > > > > --- a/include/drm/ttm/ttm_bo_api.h > > > > > > +++ b/include/drm/ttm/ttm_bo_api.h > > > > > > @@ -34,6 +34,7 @@ > > > > > >   #include > > > > > >   #include > > > > > >   #include > > > > > > +#include > > > > > >   #include > > > > > >   #include > > > > > >   #include > > > > > > @@ -486,6 +487,29 @@ static inline void *ttm_kmap_obj_virtual(struct > > > > > > ttm_bo_kmap_obj *map, > > > > > >       return map->virtual; > > > > > >   } > > > > > >   +/** > > > > > > + * ttm_kmap_obj_to_dma_buf_map > > > > > > + * > > > > > > + * @kmap: A struct ttm_bo_kmap_obj returned from ttm_bo_kmap. > > > > > > + * @map: Returns the mapping as struct dma_buf_map > > > > > > + * > > > > > > + * Converts struct ttm_bo_kmap_obj to struct dma_buf_map. If the memory > > > > > > + * is not mapped, the returned mapping is initialized to NULL. > > > > > > + */ > > > > > > +static inline void ttm_kmap_obj_to_dma_buf_map(struct ttm_bo_kmap_obj > > > > > > *kmap, > > > > > > +                           struct dma_buf_map *map) > > > > > > +{ > > > > > > +    bool is_iomem; > > > > > > +    void *vaddr = ttm_kmap_obj_virtual(kmap, &is_iomem); > > > > > > + > > > > > > +    if (!vaddr) > > > > > > +        dma_buf_map_clear(map); > > > > > > +    else if (is_iomem) > > > > > > +        dma_buf_map_set_vaddr_iomem(map, (void __force __iomem *)vaddr); > > > > > > +    else > > > > > > +        dma_buf_map_set_vaddr(map, vaddr); > > > > > > +} > > > > > > + > > > > > >   /** > > > > > >    * ttm_bo_kmap > > > > > >    * > > > > > > diff --git a/include/linux/dma-buf-map.h b/include/linux/dma-buf-map.h > > > > > > index fd1aba545fdf..2e8bbecb5091 100644 > > > > > > --- a/include/linux/dma-buf-map.h > > > > > > +++ b/include/linux/dma-buf-map.h > > > > > > @@ -45,6 +45,12 @@ > > > > > >    * > > > > > >    *    dma_buf_map_set_vaddr(&map. 0xdeadbeaf); > > > > > >    * > > > > > > + * To set an address in I/O memory, use dma_buf_map_set_vaddr_iomem(). > > > > > > + * > > > > > > + * .. code-block:: c > > > > > > + * > > > > > > + *    dma_buf_map_set_vaddr_iomem(&map. 0xdeadbeaf); > > > > > > + * > > > > > >    * Test if a mapping is valid with either dma_buf_map_is_set() or > > > > > >    * dma_buf_map_is_null(). > > > > > >    * > > > > > > @@ -118,6 +124,20 @@ static inline void dma_buf_map_set_vaddr(struct > > > > > > dma_buf_map *map, void *vaddr) > > > > > >       map->is_iomem = false; > > > > > >   } > > > > > >   +/** > > > > > > + * dma_buf_map_set_vaddr_iomem - Sets a dma-buf mapping structure to > > > > > > an address in I/O memory > > > > > > + * @map:        The dma-buf mapping structure > > > > > > + * @vaddr_iomem:    An I/O-memory address > > > > > > + * > > > > > > + * Sets the address and the I/O-memory flag. > > > > > > + */ > > > > > > +static inline void dma_buf_map_set_vaddr_iomem(struct dma_buf_map *map, > > > > > > +                           void __iomem *vaddr_iomem) > > > > > > +{ > > > > > > +    map->vaddr_iomem = vaddr_iomem; > > > > > > +    map->is_iomem = true; > > > > > > +} > > > > > > + > > > > > >   /** > > > > > >    * dma_buf_map_is_equal - Compares two dma-buf mapping structures > > > > > > for equality > > > > > >    * @lhs:    The dma-buf mapping structure > > > > > _______________________________________________ > > > > > dri-devel mailing list > > > > > dri-devel@lists.freedesktop.org > > > > > https://lists.freedesktop.org/mailman/listinfo/dri-devel > > > > _______________________________________________ > > > > amd-gfx mailing list > > > > amd-gfx@lists.freedesktop.org > > > > https://lists.freedesktop.org/mailman/listinfo/amd-gfx > > > > > > _______________________________________________ > > > dri-devel mailing list > > > dri-devel@lists.freedesktop.org > > > https://lists.freedesktop.org/mailman/listinfo/dri-devel > > > > > > > _______________________________________________ > > amd-gfx mailing list > > amd-gfx@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/amd-gfx > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9C7CEC47428 for ; Wed, 30 Sep 2020 09:47:27 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 23E962074A for ; Wed, 30 Sep 2020 09:47:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="wgMMF/hP"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="YslZyjVo" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 23E962074A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=d/pFXbLM56H21DI5pB690YvRFuLkspddMIIQcNWctAA=; b=wgMMF/hP4oX/GM1w064NTVNaE dWW6S8RtAxc3MqppZntVRQk1pys33Ui2TVMoymc8a44m2MmZnF+ZUQnWKy3jgPS8Av6n0chdZwSUl otFc0qOfnymv7I+aOIUAwn3zDfYJ3FBs18rW/q8OrdW/842kiN+UKhzfvFfqPvX+MP2S+6gpsmIqe rXUzivbDyoAeRNm0whgnFJREBilVrJq9GmdFhCtHXlqttokPsBFxU7flSUVsrK2RlNynjUQXmk93Z e9snfK5+BS2AXtRlSXPx0oQBsqxWAFJFaNmAepLKV8qv1OLrvUawrWrFZ0WgL6BGOm/jTPix4PsLn nkvj81S5Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNYhk-00019y-Pq; Wed, 30 Sep 2020 09:47:20 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kNYhh-00018x-IV for linux-rockchip@lists.infradead.org; Wed, 30 Sep 2020 09:47:18 +0000 Received: by mail-wm1-x341.google.com with SMTP id s13so977395wmh.4 for ; Wed, 30 Sep 2020 02:47:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=mk/10QMoJ+o57Gs0uKBi5jqLBb5COb+Y9kF4IXUlM/Q=; b=YslZyjVoOldROC3jA1fPKGoa2j+xP9ZMNK4SZUeZjFZmxDgc83XfrocubX8z+Ghi0i mxxZbyYhvNo/yzlGV7M9TYWiI6ebmWI5MPFUrLdFH5HEq/1glgvLqigSOT2sZCqvNTzQ 5j2dQDwMw2raEHsSORmptJcNQAmWyQj8NQX/A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=mk/10QMoJ+o57Gs0uKBi5jqLBb5COb+Y9kF4IXUlM/Q=; b=PSC7E5d/yNzwfKlhWj0soeecmu5VEp12CX5TL1IYdr2c7z3sOa0wvuueXTct8yJ7Sq urFQWd6NE4qRz241lspKBjlLYQGun7iHdQQm23INJ6G9VvG+yo9dv+VXDELN4fqRA/Jm mzX/9L5bBRmuoOYZGifZLGHO8L7k6NlGmE4QJbozQrEEKYMNuNklUiud03QMKY6IMG01 NZcv0exczMB8213B9KuyvK3rL2Ejt1tM64r3xKcBRIcGZ5UERtpFRd0hVx8UayP3gUo/ hKmIqQmFi8ubXNpSY9IoSpXmD+z036T9EMm49hxx9wOK4LuzZbBvXxdwZjQK8+eGwty6 nyXw== X-Gm-Message-State: AOAM533QFmZvn3R+TV9LgQDI+IfiA1zh7z0RB4wEchARFoFzDi2uQaCX HeJerrRUtiY+U6XOa/ioxQ2iGw== X-Google-Smtp-Source: ABdhPJy8QqpQoBX6MWQ3S7YZuW9WMNYB4GRIEped2k61Hp3lacYf00Zpjbck3DpWjhDxW2rcxoc68Q== X-Received: by 2002:a1c:98d8:: with SMTP id a207mr1952908wme.157.1601459236371; Wed, 30 Sep 2020 02:47:16 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id n6sm1769842wmd.22.2020.09.30.02.47.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Sep 2020 02:47:15 -0700 (PDT) Date: Wed, 30 Sep 2020 11:47:12 +0200 From: Daniel Vetter To: christian.koenig@amd.com Subject: Re: [PATCH v3 2/7] drm/ttm: Add ttm_kmap_obj_to_dma_buf_map() for type conversion Message-ID: <20200930094712.GW438822@phenom.ffwll.local> References: <20200929151437.19717-1-tzimmermann@suse.de> <20200929151437.19717-3-tzimmermann@suse.de> <8fad0114-064a-4ed5-c21d-d1b4294de0a1@amd.com> <2614314a-81f7-4722-c400-68d90e48e09a@suse.de> <8a84f62b-33f3-f44c-52af-c859a0e0d1fb@gmail.com> <07972ada-9135-3743-a86b-487f610c509f@suse.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Operating-System: Linux phenom 5.7.0-1-amd64 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200930_054717_646561_967F7AB1 X-CRM114-Status: GOOD ( 43.15 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: luben.tuikov@amd.com, heiko@sntech.de, airlied@linux.ie, nouveau@lists.freedesktop.org, linus.walleij@linaro.org, dri-devel@lists.freedesktop.org, chris@chris-wilson.co.uk, melissa.srw@gmail.com, eric@anholt.net, ray.huang@amd.com, kraxel@redhat.com, sam@ravnborg.org, sumit.semwal@linaro.org, emil.velikov@collabora.com, robh@kernel.org, linux-samsung-soc@vger.kernel.org, jy0922.shim@samsung.com, lima@lists.freedesktop.org, oleksandr_andrushchenko@epam.com, krzk@kernel.org, steven.price@arm.com, linux-rockchip@lists.infradead.org, kgene@kernel.org, bskeggs@redhat.com, linux+etnaviv@armlinux.org.uk, spice-devel@lists.freedesktop.org, alyssa.rosenzweig@collabora.com, daniel@ffwll.ch, maarten.lankhorst@linux.intel.com, etnaviv@lists.freedesktop.org, mripard@kernel.org, inki.dae@samsung.com, hdegoede@redhat.com, christian.gmeiner@gmail.com, xen-devel@lists.xenproject.org, virtualization@lists.linux-foundation.org, sean@poorly.run, apaneers@amd.com, linux-arm-kernel@lists.infradead.org, linaro-mm-sig@lists.linaro.org, amd-gfx@lists.freedesktop.org, tomeu.vizoso@collabora.com, sw0312.kim@samsung.com, hjc@rock-chips.com, kyungmin.park@samsung.com, miaoqinglang@huawei.com, yuq825@gmail.com, Thomas Zimmermann , alexander.deucher@amd.com, linux-media@vger.kernel.org, l.stach@pengutronix.de Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org On Wed, Sep 30, 2020 at 10:34:31AM +0200, Christian K=F6nig wrote: > Am 30.09.20 um 10:19 schrieb Thomas Zimmermann: > > Hi > > = > > Am 30.09.20 um 10:05 schrieb Christian K=F6nig: > > > Am 29.09.20 um 19:49 schrieb Thomas Zimmermann: > > > > Hi Christian > > > > = > > > > Am 29.09.20 um 17:35 schrieb Christian K=F6nig: > > > > > Am 29.09.20 um 17:14 schrieb Thomas Zimmermann: > > > > > > The new helper ttm_kmap_obj_to_dma_buf() extracts address and l= ocation > > > > > > from and instance of TTM's kmap_obj and initializes struct dma_= buf_map > > > > > > with these values. Helpful for TTM-based drivers. > > > > > We could completely drop that if we use the same structure inside= TTM as > > > > > well. > > > > > = > > > > > Additional to that which driver is going to use this? > > > > As Daniel mentioned, it's in patch 3. The TTM-based drivers will > > > > retrieve the pointer via this function. > > > > = > > > > I do want to see all that being more tightly integrated into TTM, b= ut > > > > not in this series. This one is about fixing the bochs-on-sparc64 > > > > problem for good. Patch 7 adds an update to TTM to the DRM TODO lis= t. > > > I should have asked which driver you try to fix here :) > > > = > > > In this case just keep the function inside bochs and only fix it ther= e. > > > = > > > All other drivers can be fixed when we generally pump this through TT= M. > > Did you take a look at patch 3? This function will be used by VRAM > > helpers, nouveau, radeon, amdgpu and qxl. If we don't put it here, we > > have to duplicate the functionality in each if these drivers. Bochs > > itself uses VRAM helpers and doesn't touch the function directly. > = > Ah, ok can we have that then only in the VRAM helpers? > = > Alternative you could go ahead and use dma_buf_map in ttm_bo_kmap_obj > directly and drop the hack with the TTM_BO_MAP_IOMEM_MASK. > = > What I want to avoid is to have another conversion function in TTM because > what happens here is that we already convert from ttm_bus_placement to > ttm_bo_kmap_obj and then to dma_buf_map. Hm I'm not really seeing how that helps with a gradual conversion of everything over to dma_buf_map and assorted helpers for access? There's too many places in ttm drivers where is_iomem and related stuff is used to be able to convert it all in one go. An intermediate state with a bunch of conversions seems fairly unavoidable to me. -Daniel > = > Thanks, > Christian. > = > > = > > Best regards > > Thomas > > = > > > Regards, > > > Christian. > > > = > > > > Best regards > > > > Thomas > > > > = > > > > > Regards, > > > > > Christian. > > > > > = > > > > > > Signed-off-by: Thomas Zimmermann > > > > > > --- > > > > > > =A0 include/drm/ttm/ttm_bo_api.h | 24 ++++++++++++++++++++++++ > > > > > > =A0 include/linux/dma-buf-map.h=A0 | 20 ++++++++++++++++++++ > > > > > > =A0 2 files changed, 44 insertions(+) > > > > > > = > > > > > > diff --git a/include/drm/ttm/ttm_bo_api.h b/include/drm/ttm/ttm= _bo_api.h > > > > > > index c96a25d571c8..62d89f05a801 100644 > > > > > > --- a/include/drm/ttm/ttm_bo_api.h > > > > > > +++ b/include/drm/ttm/ttm_bo_api.h > > > > > > @@ -34,6 +34,7 @@ > > > > > > =A0 #include > > > > > > =A0 #include > > > > > > =A0 #include > > > > > > +#include > > > > > > =A0 #include > > > > > > =A0 #include > > > > > > =A0 #include > > > > > > @@ -486,6 +487,29 @@ static inline void *ttm_kmap_obj_virtual(s= truct > > > > > > ttm_bo_kmap_obj *map, > > > > > > =A0=A0=A0=A0=A0 return map->virtual; > > > > > > =A0 } > > > > > > =A0 +/** > > > > > > + * ttm_kmap_obj_to_dma_buf_map > > > > > > + * > > > > > > + * @kmap: A struct ttm_bo_kmap_obj returned from ttm_bo_kmap. > > > > > > + * @map: Returns the mapping as struct dma_buf_map > > > > > > + * > > > > > > + * Converts struct ttm_bo_kmap_obj to struct dma_buf_map. If t= he memory > > > > > > + * is not mapped, the returned mapping is initialized to NULL. > > > > > > + */ > > > > > > +static inline void ttm_kmap_obj_to_dma_buf_map(struct ttm_bo_k= map_obj > > > > > > *kmap, > > > > > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 struct dma_buf_map *map) > > > > > > +{ > > > > > > +=A0=A0=A0 bool is_iomem; > > > > > > +=A0=A0=A0 void *vaddr =3D ttm_kmap_obj_virtual(kmap, &is_iomem= ); > > > > > > + > > > > > > +=A0=A0=A0 if (!vaddr) > > > > > > +=A0=A0=A0=A0=A0=A0=A0 dma_buf_map_clear(map); > > > > > > +=A0=A0=A0 else if (is_iomem) > > > > > > +=A0=A0=A0=A0=A0=A0=A0 dma_buf_map_set_vaddr_iomem(map, (void _= _force __iomem *)vaddr); > > > > > > +=A0=A0=A0 else > > > > > > +=A0=A0=A0=A0=A0=A0=A0 dma_buf_map_set_vaddr(map, vaddr); > > > > > > +} > > > > > > + > > > > > > =A0 /** > > > > > > =A0=A0 * ttm_bo_kmap > > > > > > =A0=A0 * > > > > > > diff --git a/include/linux/dma-buf-map.h b/include/linux/dma-bu= f-map.h > > > > > > index fd1aba545fdf..2e8bbecb5091 100644 > > > > > > --- a/include/linux/dma-buf-map.h > > > > > > +++ b/include/linux/dma-buf-map.h > > > > > > @@ -45,6 +45,12 @@ > > > > > > =A0=A0 * > > > > > > =A0=A0 *=A0=A0=A0 dma_buf_map_set_vaddr(&map. 0xdeadbeaf); > > > > > > =A0=A0 * > > > > > > + * To set an address in I/O memory, use dma_buf_map_set_vaddr_= iomem(). > > > > > > + * > > > > > > + * .. code-block:: c > > > > > > + * > > > > > > + *=A0=A0=A0 dma_buf_map_set_vaddr_iomem(&map. 0xdeadbeaf); > > > > > > + * > > > > > > =A0=A0 * Test if a mapping is valid with either dma_buf_map_is= _set() or > > > > > > =A0=A0 * dma_buf_map_is_null(). > > > > > > =A0=A0 * > > > > > > @@ -118,6 +124,20 @@ static inline void dma_buf_map_set_vaddr(s= truct > > > > > > dma_buf_map *map, void *vaddr) > > > > > > =A0=A0=A0=A0=A0 map->is_iomem =3D false; > > > > > > =A0 } > > > > > > =A0 +/** > > > > > > + * dma_buf_map_set_vaddr_iomem - Sets a dma-buf mapping struct= ure to > > > > > > an address in I/O memory > > > > > > + * @map:=A0=A0=A0=A0=A0=A0=A0 The dma-buf mapping structure > > > > > > + * @vaddr_iomem:=A0=A0=A0 An I/O-memory address > > > > > > + * > > > > > > + * Sets the address and the I/O-memory flag. > > > > > > + */ > > > > > > +static inline void dma_buf_map_set_vaddr_iomem(struct dma_buf_= map *map, > > > > > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 void __iomem *vaddr_iomem) > > > > > > +{ > > > > > > +=A0=A0=A0 map->vaddr_iomem =3D vaddr_iomem; > > > > > > +=A0=A0=A0 map->is_iomem =3D true; > > > > > > +} > > > > > > + > > > > > > =A0 /** > > > > > > =A0=A0 * dma_buf_map_is_equal - Compares two dma-buf mapping s= tructures > > > > > > for equality > > > > > > =A0=A0 * @lhs:=A0=A0=A0 The dma-buf mapping structure > > > > > _______________________________________________ > > > > > dri-devel mailing list > > > > > dri-devel@lists.freedesktop.org > > > > > https://lists.freedesktop.org/mailman/listinfo/dri-devel > > > > _______________________________________________ > > > > amd-gfx mailing list > > > > amd-gfx@lists.freedesktop.org > > > > https://lists.freedesktop.org/mailman/listinfo/amd-gfx > > > = > > > _______________________________________________ > > > dri-devel mailing list > > > dri-devel@lists.freedesktop.org > > > https://lists.freedesktop.org/mailman/listinfo/dri-devel > > > = > > = > > _______________________________________________ > > amd-gfx mailing list > > amd-gfx@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/amd-gfx > = -- = Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0B5D8C4727E for ; Wed, 30 Sep 2020 09:47:23 +0000 (UTC) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7F8A82074A for ; Wed, 30 Sep 2020 09:47:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="YslZyjVo" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7F8A82074A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=virtualization-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 2828085EC6; Wed, 30 Sep 2020 09:47:22 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aAiTxS4GDfnj; Wed, 30 Sep 2020 09:47:21 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by fraxinus.osuosl.org (Postfix) with ESMTP id 6244B86031; Wed, 30 Sep 2020 09:47:21 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 49D07C0889; Wed, 30 Sep 2020 09:47:21 +0000 (UTC) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 87CD4C0051 for ; Wed, 30 Sep 2020 09:47:19 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 7673685EC6 for ; Wed, 30 Sep 2020 09:47:19 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Zz-vWpYvLEsq for ; Wed, 30 Sep 2020 09:47:18 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 42D7485AB5 for ; Wed, 30 Sep 2020 09:47:18 +0000 (UTC) Received: by mail-wm1-f65.google.com with SMTP id q9so988704wmj.2 for ; Wed, 30 Sep 2020 02:47:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=mk/10QMoJ+o57Gs0uKBi5jqLBb5COb+Y9kF4IXUlM/Q=; b=YslZyjVoOldROC3jA1fPKGoa2j+xP9ZMNK4SZUeZjFZmxDgc83XfrocubX8z+Ghi0i mxxZbyYhvNo/yzlGV7M9TYWiI6ebmWI5MPFUrLdFH5HEq/1glgvLqigSOT2sZCqvNTzQ 5j2dQDwMw2raEHsSORmptJcNQAmWyQj8NQX/A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=mk/10QMoJ+o57Gs0uKBi5jqLBb5COb+Y9kF4IXUlM/Q=; b=SsODGw+Q0ci7D3uhjHU8vlgQ32UzW6fY0jKfpJ+FnBr8P0Y4pVq4QwstSAeZ8M7P1i DnP9OAZLU9kj6Z5WkHo8vA+7uzT1fsVajZuT4i3QGJ/tnmiwaFVJme7KaXRH+7tHBbhi ngosHEe0i/LIr3IBIvptSNkBEpFtaYf5i+/NevO/IpTE/sE0tn3Psiqrhib6n3xYJul0 xM1wH++B9EH+XtjXsT97Lwy6G7VCt62mOf+l74OEGPEtx+CLMTzgIdy0bUs5h96+NpbH lq6Nzix3Q8zEcvbic/UbvMYxTjZPo6bi1tHcvo945ArmwIWpTUIOCQA4O1I6tzjfDPY3 CCkw== X-Gm-Message-State: AOAM532+uDK63UyU4W/1AvEqxJjQCX+ogdMvbu6MwkUmKX38puLiKFqT JqruLm8XMRnxzfwyPP/iTNh1OQ== X-Google-Smtp-Source: ABdhPJy8QqpQoBX6MWQ3S7YZuW9WMNYB4GRIEped2k61Hp3lacYf00Zpjbck3DpWjhDxW2rcxoc68Q== X-Received: by 2002:a1c:98d8:: with SMTP id a207mr1952908wme.157.1601459236371; Wed, 30 Sep 2020 02:47:16 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id n6sm1769842wmd.22.2020.09.30.02.47.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Sep 2020 02:47:15 -0700 (PDT) Date: Wed, 30 Sep 2020 11:47:12 +0200 From: Daniel Vetter To: christian.koenig@amd.com Subject: Re: [PATCH v3 2/7] drm/ttm: Add ttm_kmap_obj_to_dma_buf_map() for type conversion Message-ID: <20200930094712.GW438822@phenom.ffwll.local> References: <20200929151437.19717-1-tzimmermann@suse.de> <20200929151437.19717-3-tzimmermann@suse.de> <8fad0114-064a-4ed5-c21d-d1b4294de0a1@amd.com> <2614314a-81f7-4722-c400-68d90e48e09a@suse.de> <8a84f62b-33f3-f44c-52af-c859a0e0d1fb@gmail.com> <07972ada-9135-3743-a86b-487f610c509f@suse.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Operating-System: Linux phenom 5.7.0-1-amd64 Cc: luben.tuikov@amd.com, heiko@sntech.de, airlied@linux.ie, nouveau@lists.freedesktop.org, linus.walleij@linaro.org, dri-devel@lists.freedesktop.org, chris@chris-wilson.co.uk, melissa.srw@gmail.com, eric@anholt.net, ray.huang@amd.com, sam@ravnborg.org, sumit.semwal@linaro.org, emil.velikov@collabora.com, robh@kernel.org, linux-samsung-soc@vger.kernel.org, jy0922.shim@samsung.com, lima@lists.freedesktop.org, oleksandr_andrushchenko@epam.com, krzk@kernel.org, steven.price@arm.com, linux-rockchip@lists.infradead.org, kgene@kernel.org, bskeggs@redhat.com, linux+etnaviv@armlinux.org.uk, spice-devel@lists.freedesktop.org, alyssa.rosenzweig@collabora.com, daniel@ffwll.ch, maarten.lankhorst@linux.intel.com, etnaviv@lists.freedesktop.org, mripard@kernel.org, inki.dae@samsung.com, hdegoede@redhat.com, christian.gmeiner@gmail.com, xen-devel@lists.xenproject.org, virtualization@lists.linux-foundation.org, sean@poorly.run, apaneers@amd.com, linux-arm-kernel@lists.infradead.org, linaro-mm-sig@lists.linaro.org, amd-gfx@lists.freedesktop.org, tomeu.vizoso@collabora.com, sw0312.kim@samsung.com, hjc@rock-chips.com, kyungmin.park@samsung.com, miaoqinglang@huawei.com, yuq825@gmail.com, Thomas Zimmermann , alexander.deucher@amd.com, linux-media@vger.kernel.org, l.stach@pengutronix.de X-BeenThere: virtualization@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux virtualization List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: virtualization-bounces@lists.linux-foundation.org Sender: "Virtualization" On Wed, Sep 30, 2020 at 10:34:31AM +0200, Christian K=F6nig wrote: > Am 30.09.20 um 10:19 schrieb Thomas Zimmermann: > > Hi > > = > > Am 30.09.20 um 10:05 schrieb Christian K=F6nig: > > > Am 29.09.20 um 19:49 schrieb Thomas Zimmermann: > > > > Hi Christian > > > > = > > > > Am 29.09.20 um 17:35 schrieb Christian K=F6nig: > > > > > Am 29.09.20 um 17:14 schrieb Thomas Zimmermann: > > > > > > The new helper ttm_kmap_obj_to_dma_buf() extracts address and l= ocation > > > > > > from and instance of TTM's kmap_obj and initializes struct dma_= buf_map > > > > > > with these values. Helpful for TTM-based drivers. > > > > > We could completely drop that if we use the same structure inside= TTM as > > > > > well. > > > > > = > > > > > Additional to that which driver is going to use this? > > > > As Daniel mentioned, it's in patch 3. The TTM-based drivers will > > > > retrieve the pointer via this function. > > > > = > > > > I do want to see all that being more tightly integrated into TTM, b= ut > > > > not in this series. This one is about fixing the bochs-on-sparc64 > > > > problem for good. Patch 7 adds an update to TTM to the DRM TODO lis= t. > > > I should have asked which driver you try to fix here :) > > > = > > > In this case just keep the function inside bochs and only fix it ther= e. > > > = > > > All other drivers can be fixed when we generally pump this through TT= M. > > Did you take a look at patch 3? This function will be used by VRAM > > helpers, nouveau, radeon, amdgpu and qxl. If we don't put it here, we > > have to duplicate the functionality in each if these drivers. Bochs > > itself uses VRAM helpers and doesn't touch the function directly. > = > Ah, ok can we have that then only in the VRAM helpers? > = > Alternative you could go ahead and use dma_buf_map in ttm_bo_kmap_obj > directly and drop the hack with the TTM_BO_MAP_IOMEM_MASK. > = > What I want to avoid is to have another conversion function in TTM because > what happens here is that we already convert from ttm_bus_placement to > ttm_bo_kmap_obj and then to dma_buf_map. Hm I'm not really seeing how that helps with a gradual conversion of everything over to dma_buf_map and assorted helpers for access? There's too many places in ttm drivers where is_iomem and related stuff is used to be able to convert it all in one go. An intermediate state with a bunch of conversions seems fairly unavoidable to me. -Daniel > = > Thanks, > Christian. > = > > = > > Best regards > > Thomas > > = > > > Regards, > > > Christian. > > > = > > > > Best regards > > > > Thomas > > > > = > > > > > Regards, > > > > > Christian. > > > > > = > > > > > > Signed-off-by: Thomas Zimmermann > > > > > > --- > > > > > > =A0 include/drm/ttm/ttm_bo_api.h | 24 ++++++++++++++++++++++++ > > > > > > =A0 include/linux/dma-buf-map.h=A0 | 20 ++++++++++++++++++++ > > > > > > =A0 2 files changed, 44 insertions(+) > > > > > > = > > > > > > diff --git a/include/drm/ttm/ttm_bo_api.h b/include/drm/ttm/ttm= _bo_api.h > > > > > > index c96a25d571c8..62d89f05a801 100644 > > > > > > --- a/include/drm/ttm/ttm_bo_api.h > > > > > > +++ b/include/drm/ttm/ttm_bo_api.h > > > > > > @@ -34,6 +34,7 @@ > > > > > > =A0 #include > > > > > > =A0 #include > > > > > > =A0 #include > > > > > > +#include > > > > > > =A0 #include > > > > > > =A0 #include > > > > > > =A0 #include > > > > > > @@ -486,6 +487,29 @@ static inline void *ttm_kmap_obj_virtual(s= truct > > > > > > ttm_bo_kmap_obj *map, > > > > > > =A0=A0=A0=A0=A0 return map->virtual; > > > > > > =A0 } > > > > > > =A0 +/** > > > > > > + * ttm_kmap_obj_to_dma_buf_map > > > > > > + * > > > > > > + * @kmap: A struct ttm_bo_kmap_obj returned from ttm_bo_kmap. > > > > > > + * @map: Returns the mapping as struct dma_buf_map > > > > > > + * > > > > > > + * Converts struct ttm_bo_kmap_obj to struct dma_buf_map. If t= he memory > > > > > > + * is not mapped, the returned mapping is initialized to NULL. > > > > > > + */ > > > > > > +static inline void ttm_kmap_obj_to_dma_buf_map(struct ttm_bo_k= map_obj > > > > > > *kmap, > > > > > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 struct dma_buf_map *map) > > > > > > +{ > > > > > > +=A0=A0=A0 bool is_iomem; > > > > > > +=A0=A0=A0 void *vaddr =3D ttm_kmap_obj_virtual(kmap, &is_iomem= ); > > > > > > + > > > > > > +=A0=A0=A0 if (!vaddr) > > > > > > +=A0=A0=A0=A0=A0=A0=A0 dma_buf_map_clear(map); > > > > > > +=A0=A0=A0 else if (is_iomem) > > > > > > +=A0=A0=A0=A0=A0=A0=A0 dma_buf_map_set_vaddr_iomem(map, (void _= _force __iomem *)vaddr); > > > > > > +=A0=A0=A0 else > > > > > > +=A0=A0=A0=A0=A0=A0=A0 dma_buf_map_set_vaddr(map, vaddr); > > > > > > +} > > > > > > + > > > > > > =A0 /** > > > > > > =A0=A0 * ttm_bo_kmap > > > > > > =A0=A0 * > > > > > > diff --git a/include/linux/dma-buf-map.h b/include/linux/dma-bu= f-map.h > > > > > > index fd1aba545fdf..2e8bbecb5091 100644 > > > > > > --- a/include/linux/dma-buf-map.h > > > > > > +++ b/include/linux/dma-buf-map.h > > > > > > @@ -45,6 +45,12 @@ > > > > > > =A0=A0 * > > > > > > =A0=A0 *=A0=A0=A0 dma_buf_map_set_vaddr(&map. 0xdeadbeaf); > > > > > > =A0=A0 * > > > > > > + * To set an address in I/O memory, use dma_buf_map_set_vaddr_= iomem(). > > > > > > + * > > > > > > + * .. code-block:: c > > > > > > + * > > > > > > + *=A0=A0=A0 dma_buf_map_set_vaddr_iomem(&map. 0xdeadbeaf); > > > > > > + * > > > > > > =A0=A0 * Test if a mapping is valid with either dma_buf_map_is= _set() or > > > > > > =A0=A0 * dma_buf_map_is_null(). > > > > > > =A0=A0 * > > > > > > @@ -118,6 +124,20 @@ static inline void dma_buf_map_set_vaddr(s= truct > > > > > > dma_buf_map *map, void *vaddr) > > > > > > =A0=A0=A0=A0=A0 map->is_iomem =3D false; > > > > > > =A0 } > > > > > > =A0 +/** > > > > > > + * dma_buf_map_set_vaddr_iomem - Sets a dma-buf mapping struct= ure to > > > > > > an address in I/O memory > > > > > > + * @map:=A0=A0=A0=A0=A0=A0=A0 The dma-buf mapping structure > > > > > > + * @vaddr_iomem:=A0=A0=A0 An I/O-memory address > > > > > > + * > > > > > > + * Sets the address and the I/O-memory flag. > > > > > > + */ > > > > > > +static inline void dma_buf_map_set_vaddr_iomem(struct dma_buf_= map *map, > > > > > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 void __iomem *vaddr_iomem) > > > > > > +{ > > > > > > +=A0=A0=A0 map->vaddr_iomem =3D vaddr_iomem; > > > > > > +=A0=A0=A0 map->is_iomem =3D true; > > > > > > +} > > > > > > + > > > > > > =A0 /** > > > > > > =A0=A0 * dma_buf_map_is_equal - Compares two dma-buf mapping s= tructures > > > > > > for equality > > > > > > =A0=A0 * @lhs:=A0=A0=A0 The dma-buf mapping structure > > > > > _______________________________________________ > > > > > dri-devel mailing list > > > > > dri-devel@lists.freedesktop.org > > > > > https://lists.freedesktop.org/mailman/listinfo/dri-devel > > > > _______________________________________________ > > > > amd-gfx mailing list > > > > amd-gfx@lists.freedesktop.org > > > > https://lists.freedesktop.org/mailman/listinfo/amd-gfx > > > = > > > _______________________________________________ > > > dri-devel mailing list > > > dri-devel@lists.freedesktop.org > > > https://lists.freedesktop.org/mailman/listinfo/dri-devel > > > = > > = > > _______________________________________________ > > amd-gfx mailing list > > amd-gfx@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/amd-gfx > = -- = Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3366DC47427 for ; Wed, 30 Sep 2020 09:47:23 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DCA5A2075F for ; Wed, 30 Sep 2020 09:47:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="YslZyjVo" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DCA5A2075F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A822589CFA; Wed, 30 Sep 2020 09:47:19 +0000 (UTC) Received: from mail-wm1-x344.google.com (mail-wm1-x344.google.com [IPv6:2a00:1450:4864:20::344]) by gabe.freedesktop.org (Postfix) with ESMTPS id C59CB89CF4 for ; Wed, 30 Sep 2020 09:47:17 +0000 (UTC) Received: by mail-wm1-x344.google.com with SMTP id x23so982773wmi.3 for ; Wed, 30 Sep 2020 02:47:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=mk/10QMoJ+o57Gs0uKBi5jqLBb5COb+Y9kF4IXUlM/Q=; b=YslZyjVoOldROC3jA1fPKGoa2j+xP9ZMNK4SZUeZjFZmxDgc83XfrocubX8z+Ghi0i mxxZbyYhvNo/yzlGV7M9TYWiI6ebmWI5MPFUrLdFH5HEq/1glgvLqigSOT2sZCqvNTzQ 5j2dQDwMw2raEHsSORmptJcNQAmWyQj8NQX/A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=mk/10QMoJ+o57Gs0uKBi5jqLBb5COb+Y9kF4IXUlM/Q=; b=CofjudcnNt+LwfCZ3SwOGGyWnUVXs9cMd2v9agm1Qb4ImHm+SEgun3GXiI7735An2p LxyrnPGXDdeQRD4YsLNoe6HVoXlKjX9M4sCJOXzx+9IBpCPan10mn+ePlxfP98fINDD2 2bb9On5HASLjGO4izXw6uaWAn2LGaSl8gfrtHq2up6Nh/RWKeEl4sLm10BBPLS+nI/BV hh/gvtCgNsdofxEvUL6MwIBtP2F5Yh7btvoU0rsi7NBcGOxF/JiR5SKnjv2GSmk9V7oF XV1LYP0yTKSrkKRYqO35+WdBfGEH/Z1ddq9WNTesufCuvqgeSJFyTGF2+GVnvXFL0T9H G16g== X-Gm-Message-State: AOAM533q7LRBxvbXiWCsBXsZ494a7cRUyChLrvGa/0gbzV2kem9wvk9H MEWl4pjpOnbwbK865QfTOqjwuA== X-Google-Smtp-Source: ABdhPJy8QqpQoBX6MWQ3S7YZuW9WMNYB4GRIEped2k61Hp3lacYf00Zpjbck3DpWjhDxW2rcxoc68Q== X-Received: by 2002:a1c:98d8:: with SMTP id a207mr1952908wme.157.1601459236371; Wed, 30 Sep 2020 02:47:16 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id n6sm1769842wmd.22.2020.09.30.02.47.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Sep 2020 02:47:15 -0700 (PDT) Date: Wed, 30 Sep 2020 11:47:12 +0200 From: Daniel Vetter To: christian.koenig@amd.com Subject: Re: [PATCH v3 2/7] drm/ttm: Add ttm_kmap_obj_to_dma_buf_map() for type conversion Message-ID: <20200930094712.GW438822@phenom.ffwll.local> References: <20200929151437.19717-1-tzimmermann@suse.de> <20200929151437.19717-3-tzimmermann@suse.de> <8fad0114-064a-4ed5-c21d-d1b4294de0a1@amd.com> <2614314a-81f7-4722-c400-68d90e48e09a@suse.de> <8a84f62b-33f3-f44c-52af-c859a0e0d1fb@gmail.com> <07972ada-9135-3743-a86b-487f610c509f@suse.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Operating-System: Linux phenom 5.7.0-1-amd64 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: luben.tuikov@amd.com, airlied@linux.ie, nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org, chris@chris-wilson.co.uk, melissa.srw@gmail.com, ray.huang@amd.com, kraxel@redhat.com, sam@ravnborg.org, emil.velikov@collabora.com, linux-samsung-soc@vger.kernel.org, jy0922.shim@samsung.com, lima@lists.freedesktop.org, oleksandr_andrushchenko@epam.com, krzk@kernel.org, steven.price@arm.com, linux-rockchip@lists.infradead.org, kgene@kernel.org, bskeggs@redhat.com, linux+etnaviv@armlinux.org.uk, spice-devel@lists.freedesktop.org, alyssa.rosenzweig@collabora.com, etnaviv@lists.freedesktop.org, hdegoede@redhat.com, xen-devel@lists.xenproject.org, virtualization@lists.linux-foundation.org, sean@poorly.run, apaneers@amd.com, linux-arm-kernel@lists.infradead.org, linaro-mm-sig@lists.linaro.org, amd-gfx@lists.freedesktop.org, tomeu.vizoso@collabora.com, sw0312.kim@samsung.com, hjc@rock-chips.com, kyungmin.park@samsung.com, miaoqinglang@huawei.com, yuq825@gmail.com, Thomas Zimmermann , alexander.deucher@amd.com, linux-media@vger.kernel.org Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Wed, Sep 30, 2020 at 10:34:31AM +0200, Christian K=F6nig wrote: > Am 30.09.20 um 10:19 schrieb Thomas Zimmermann: > > Hi > > = > > Am 30.09.20 um 10:05 schrieb Christian K=F6nig: > > > Am 29.09.20 um 19:49 schrieb Thomas Zimmermann: > > > > Hi Christian > > > > = > > > > Am 29.09.20 um 17:35 schrieb Christian K=F6nig: > > > > > Am 29.09.20 um 17:14 schrieb Thomas Zimmermann: > > > > > > The new helper ttm_kmap_obj_to_dma_buf() extracts address and l= ocation > > > > > > from and instance of TTM's kmap_obj and initializes struct dma_= buf_map > > > > > > with these values. Helpful for TTM-based drivers. > > > > > We could completely drop that if we use the same structure inside= TTM as > > > > > well. > > > > > = > > > > > Additional to that which driver is going to use this? > > > > As Daniel mentioned, it's in patch 3. The TTM-based drivers will > > > > retrieve the pointer via this function. > > > > = > > > > I do want to see all that being more tightly integrated into TTM, b= ut > > > > not in this series. This one is about fixing the bochs-on-sparc64 > > > > problem for good. Patch 7 adds an update to TTM to the DRM TODO lis= t. > > > I should have asked which driver you try to fix here :) > > > = > > > In this case just keep the function inside bochs and only fix it ther= e. > > > = > > > All other drivers can be fixed when we generally pump this through TT= M. > > Did you take a look at patch 3? This function will be used by VRAM > > helpers, nouveau, radeon, amdgpu and qxl. If we don't put it here, we > > have to duplicate the functionality in each if these drivers. Bochs > > itself uses VRAM helpers and doesn't touch the function directly. > = > Ah, ok can we have that then only in the VRAM helpers? > = > Alternative you could go ahead and use dma_buf_map in ttm_bo_kmap_obj > directly and drop the hack with the TTM_BO_MAP_IOMEM_MASK. > = > What I want to avoid is to have another conversion function in TTM because > what happens here is that we already convert from ttm_bus_placement to > ttm_bo_kmap_obj and then to dma_buf_map. Hm I'm not really seeing how that helps with a gradual conversion of everything over to dma_buf_map and assorted helpers for access? There's too many places in ttm drivers where is_iomem and related stuff is used to be able to convert it all in one go. An intermediate state with a bunch of conversions seems fairly unavoidable to me. -Daniel > = > Thanks, > Christian. > = > > = > > Best regards > > Thomas > > = > > > Regards, > > > Christian. > > > = > > > > Best regards > > > > Thomas > > > > = > > > > > Regards, > > > > > Christian. > > > > > = > > > > > > Signed-off-by: Thomas Zimmermann > > > > > > --- > > > > > > =A0 include/drm/ttm/ttm_bo_api.h | 24 ++++++++++++++++++++++++ > > > > > > =A0 include/linux/dma-buf-map.h=A0 | 20 ++++++++++++++++++++ > > > > > > =A0 2 files changed, 44 insertions(+) > > > > > > = > > > > > > diff --git a/include/drm/ttm/ttm_bo_api.h b/include/drm/ttm/ttm= _bo_api.h > > > > > > index c96a25d571c8..62d89f05a801 100644 > > > > > > --- a/include/drm/ttm/ttm_bo_api.h > > > > > > +++ b/include/drm/ttm/ttm_bo_api.h > > > > > > @@ -34,6 +34,7 @@ > > > > > > =A0 #include > > > > > > =A0 #include > > > > > > =A0 #include > > > > > > +#include > > > > > > =A0 #include > > > > > > =A0 #include > > > > > > =A0 #include > > > > > > @@ -486,6 +487,29 @@ static inline void *ttm_kmap_obj_virtual(s= truct > > > > > > ttm_bo_kmap_obj *map, > > > > > > =A0=A0=A0=A0=A0 return map->virtual; > > > > > > =A0 } > > > > > > =A0 +/** > > > > > > + * ttm_kmap_obj_to_dma_buf_map > > > > > > + * > > > > > > + * @kmap: A struct ttm_bo_kmap_obj returned from ttm_bo_kmap. > > > > > > + * @map: Returns the mapping as struct dma_buf_map > > > > > > + * > > > > > > + * Converts struct ttm_bo_kmap_obj to struct dma_buf_map. If t= he memory > > > > > > + * is not mapped, the returned mapping is initialized to NULL. > > > > > > + */ > > > > > > +static inline void ttm_kmap_obj_to_dma_buf_map(struct ttm_bo_k= map_obj > > > > > > *kmap, > > > > > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 struct dma_buf_map *map) > > > > > > +{ > > > > > > +=A0=A0=A0 bool is_iomem; > > > > > > +=A0=A0=A0 void *vaddr =3D ttm_kmap_obj_virtual(kmap, &is_iomem= ); > > > > > > + > > > > > > +=A0=A0=A0 if (!vaddr) > > > > > > +=A0=A0=A0=A0=A0=A0=A0 dma_buf_map_clear(map); > > > > > > +=A0=A0=A0 else if (is_iomem) > > > > > > +=A0=A0=A0=A0=A0=A0=A0 dma_buf_map_set_vaddr_iomem(map, (void _= _force __iomem *)vaddr); > > > > > > +=A0=A0=A0 else > > > > > > +=A0=A0=A0=A0=A0=A0=A0 dma_buf_map_set_vaddr(map, vaddr); > > > > > > +} > > > > > > + > > > > > > =A0 /** > > > > > > =A0=A0 * ttm_bo_kmap > > > > > > =A0=A0 * > > > > > > diff --git a/include/linux/dma-buf-map.h b/include/linux/dma-bu= f-map.h > > > > > > index fd1aba545fdf..2e8bbecb5091 100644 > > > > > > --- a/include/linux/dma-buf-map.h > > > > > > +++ b/include/linux/dma-buf-map.h > > > > > > @@ -45,6 +45,12 @@ > > > > > > =A0=A0 * > > > > > > =A0=A0 *=A0=A0=A0 dma_buf_map_set_vaddr(&map. 0xdeadbeaf); > > > > > > =A0=A0 * > > > > > > + * To set an address in I/O memory, use dma_buf_map_set_vaddr_= iomem(). > > > > > > + * > > > > > > + * .. code-block:: c > > > > > > + * > > > > > > + *=A0=A0=A0 dma_buf_map_set_vaddr_iomem(&map. 0xdeadbeaf); > > > > > > + * > > > > > > =A0=A0 * Test if a mapping is valid with either dma_buf_map_is= _set() or > > > > > > =A0=A0 * dma_buf_map_is_null(). > > > > > > =A0=A0 * > > > > > > @@ -118,6 +124,20 @@ static inline void dma_buf_map_set_vaddr(s= truct > > > > > > dma_buf_map *map, void *vaddr) > > > > > > =A0=A0=A0=A0=A0 map->is_iomem =3D false; > > > > > > =A0 } > > > > > > =A0 +/** > > > > > > + * dma_buf_map_set_vaddr_iomem - Sets a dma-buf mapping struct= ure to > > > > > > an address in I/O memory > > > > > > + * @map:=A0=A0=A0=A0=A0=A0=A0 The dma-buf mapping structure > > > > > > + * @vaddr_iomem:=A0=A0=A0 An I/O-memory address > > > > > > + * > > > > > > + * Sets the address and the I/O-memory flag. > > > > > > + */ > > > > > > +static inline void dma_buf_map_set_vaddr_iomem(struct dma_buf_= map *map, > > > > > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 void __iomem *vaddr_iomem) > > > > > > +{ > > > > > > +=A0=A0=A0 map->vaddr_iomem =3D vaddr_iomem; > > > > > > +=A0=A0=A0 map->is_iomem =3D true; > > > > > > +} > > > > > > + > > > > > > =A0 /** > > > > > > =A0=A0 * dma_buf_map_is_equal - Compares two dma-buf mapping s= tructures > > > > > > for equality > > > > > > =A0=A0 * @lhs:=A0=A0=A0 The dma-buf mapping structure > > > > > _______________________________________________ > > > > > dri-devel mailing list > > > > > dri-devel@lists.freedesktop.org > > > > > https://lists.freedesktop.org/mailman/listinfo/dri-devel > > > > _______________________________________________ > > > > amd-gfx mailing list > > > > amd-gfx@lists.freedesktop.org > > > > https://lists.freedesktop.org/mailman/listinfo/amd-gfx > > > = > > > _______________________________________________ > > > dri-devel mailing list > > > dri-devel@lists.freedesktop.org > > > https://lists.freedesktop.org/mailman/listinfo/dri-devel > > > = > > = > > _______________________________________________ > > amd-gfx mailing list > > amd-gfx@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/amd-gfx > = -- = Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5F74BC4727F for ; Wed, 30 Sep 2020 09:47:20 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0538220789 for ; Wed, 30 Sep 2020 09:47:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="YslZyjVo" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0538220789 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=amd-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 441F16E5B0; Wed, 30 Sep 2020 09:47:19 +0000 (UTC) Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by gabe.freedesktop.org (Postfix) with ESMTPS id D14D189CFA for ; Wed, 30 Sep 2020 09:47:17 +0000 (UTC) Received: by mail-wm1-x341.google.com with SMTP id d4so976284wmd.5 for ; Wed, 30 Sep 2020 02:47:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=mk/10QMoJ+o57Gs0uKBi5jqLBb5COb+Y9kF4IXUlM/Q=; b=YslZyjVoOldROC3jA1fPKGoa2j+xP9ZMNK4SZUeZjFZmxDgc83XfrocubX8z+Ghi0i mxxZbyYhvNo/yzlGV7M9TYWiI6ebmWI5MPFUrLdFH5HEq/1glgvLqigSOT2sZCqvNTzQ 5j2dQDwMw2raEHsSORmptJcNQAmWyQj8NQX/A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=mk/10QMoJ+o57Gs0uKBi5jqLBb5COb+Y9kF4IXUlM/Q=; b=NV4fZvJoldrFdWOCDuSWysnDBjU+2AFqb59a5SO5pmSsOkj8shUWHYmi2eLrMS5EfS /jn1WyShoOHMWdzCn1qktSm/Id/LpoQ/Zrt7RviiOcP7FTXsHlAI1QojDHr/+moqIODl BrahxQ1ja4+NFJXhm9Y1qAt4S1vsLnZt7d3LwPtFuHryOmrlvgYnzdg6mAd3Du4dbBVn OkRSdEhcvsr+oPx4HYZ2ZMS2QZjsPlvcpPu+9MoZYrISUTANLICAgyA4L0JQND+iK6wp SJ6uJbAgob2xq6ZrScAtYoPHqHTsBB9qIEQhJ9QoqsyMFMezeEANdBP8ArAeRIektsY5 hCSg== X-Gm-Message-State: AOAM53171fr8TJxXJ/WfjeVgzZ9+RTtLkh0s7YapZBeHXlnrRL/7qtBX EPMrzVfrt0KKkH+PCvah8SuDrw== X-Google-Smtp-Source: ABdhPJy8QqpQoBX6MWQ3S7YZuW9WMNYB4GRIEped2k61Hp3lacYf00Zpjbck3DpWjhDxW2rcxoc68Q== X-Received: by 2002:a1c:98d8:: with SMTP id a207mr1952908wme.157.1601459236371; Wed, 30 Sep 2020 02:47:16 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id n6sm1769842wmd.22.2020.09.30.02.47.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Sep 2020 02:47:15 -0700 (PDT) Date: Wed, 30 Sep 2020 11:47:12 +0200 From: Daniel Vetter To: christian.koenig@amd.com Subject: Re: [PATCH v3 2/7] drm/ttm: Add ttm_kmap_obj_to_dma_buf_map() for type conversion Message-ID: <20200930094712.GW438822@phenom.ffwll.local> References: <20200929151437.19717-1-tzimmermann@suse.de> <20200929151437.19717-3-tzimmermann@suse.de> <8fad0114-064a-4ed5-c21d-d1b4294de0a1@amd.com> <2614314a-81f7-4722-c400-68d90e48e09a@suse.de> <8a84f62b-33f3-f44c-52af-c859a0e0d1fb@gmail.com> <07972ada-9135-3743-a86b-487f610c509f@suse.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Operating-System: Linux phenom 5.7.0-1-amd64 X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: luben.tuikov@amd.com, heiko@sntech.de, airlied@linux.ie, nouveau@lists.freedesktop.org, linus.walleij@linaro.org, dri-devel@lists.freedesktop.org, chris@chris-wilson.co.uk, melissa.srw@gmail.com, eric@anholt.net, ray.huang@amd.com, kraxel@redhat.com, sam@ravnborg.org, sumit.semwal@linaro.org, emil.velikov@collabora.com, robh@kernel.org, linux-samsung-soc@vger.kernel.org, jy0922.shim@samsung.com, lima@lists.freedesktop.org, oleksandr_andrushchenko@epam.com, krzk@kernel.org, steven.price@arm.com, linux-rockchip@lists.infradead.org, kgene@kernel.org, bskeggs@redhat.com, linux+etnaviv@armlinux.org.uk, spice-devel@lists.freedesktop.org, alyssa.rosenzweig@collabora.com, daniel@ffwll.ch, maarten.lankhorst@linux.intel.com, etnaviv@lists.freedesktop.org, mripard@kernel.org, inki.dae@samsung.com, hdegoede@redhat.com, christian.gmeiner@gmail.com, xen-devel@lists.xenproject.org, virtualization@lists.linux-foundation.org, sean@poorly.run, apaneers@amd.com, linux-arm-kernel@lists.infradead.org, linaro-mm-sig@lists.linaro.org, amd-gfx@lists.freedesktop.org, tomeu.vizoso@collabora.com, sw0312.kim@samsung.com, hjc@rock-chips.com, kyungmin.park@samsung.com, miaoqinglang@huawei.com, yuq825@gmail.com, Thomas Zimmermann , alexander.deucher@amd.com, linux-media@vger.kernel.org, l.stach@pengutronix.de Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" On Wed, Sep 30, 2020 at 10:34:31AM +0200, Christian K=F6nig wrote: > Am 30.09.20 um 10:19 schrieb Thomas Zimmermann: > > Hi > > = > > Am 30.09.20 um 10:05 schrieb Christian K=F6nig: > > > Am 29.09.20 um 19:49 schrieb Thomas Zimmermann: > > > > Hi Christian > > > > = > > > > Am 29.09.20 um 17:35 schrieb Christian K=F6nig: > > > > > Am 29.09.20 um 17:14 schrieb Thomas Zimmermann: > > > > > > The new helper ttm_kmap_obj_to_dma_buf() extracts address and l= ocation > > > > > > from and instance of TTM's kmap_obj and initializes struct dma_= buf_map > > > > > > with these values. Helpful for TTM-based drivers. > > > > > We could completely drop that if we use the same structure inside= TTM as > > > > > well. > > > > > = > > > > > Additional to that which driver is going to use this? > > > > As Daniel mentioned, it's in patch 3. The TTM-based drivers will > > > > retrieve the pointer via this function. > > > > = > > > > I do want to see all that being more tightly integrated into TTM, b= ut > > > > not in this series. This one is about fixing the bochs-on-sparc64 > > > > problem for good. Patch 7 adds an update to TTM to the DRM TODO lis= t. > > > I should have asked which driver you try to fix here :) > > > = > > > In this case just keep the function inside bochs and only fix it ther= e. > > > = > > > All other drivers can be fixed when we generally pump this through TT= M. > > Did you take a look at patch 3? This function will be used by VRAM > > helpers, nouveau, radeon, amdgpu and qxl. If we don't put it here, we > > have to duplicate the functionality in each if these drivers. Bochs > > itself uses VRAM helpers and doesn't touch the function directly. > = > Ah, ok can we have that then only in the VRAM helpers? > = > Alternative you could go ahead and use dma_buf_map in ttm_bo_kmap_obj > directly and drop the hack with the TTM_BO_MAP_IOMEM_MASK. > = > What I want to avoid is to have another conversion function in TTM because > what happens here is that we already convert from ttm_bus_placement to > ttm_bo_kmap_obj and then to dma_buf_map. Hm I'm not really seeing how that helps with a gradual conversion of everything over to dma_buf_map and assorted helpers for access? There's too many places in ttm drivers where is_iomem and related stuff is used to be able to convert it all in one go. An intermediate state with a bunch of conversions seems fairly unavoidable to me. -Daniel > = > Thanks, > Christian. > = > > = > > Best regards > > Thomas > > = > > > Regards, > > > Christian. > > > = > > > > Best regards > > > > Thomas > > > > = > > > > > Regards, > > > > > Christian. > > > > > = > > > > > > Signed-off-by: Thomas Zimmermann > > > > > > --- > > > > > > =A0 include/drm/ttm/ttm_bo_api.h | 24 ++++++++++++++++++++++++ > > > > > > =A0 include/linux/dma-buf-map.h=A0 | 20 ++++++++++++++++++++ > > > > > > =A0 2 files changed, 44 insertions(+) > > > > > > = > > > > > > diff --git a/include/drm/ttm/ttm_bo_api.h b/include/drm/ttm/ttm= _bo_api.h > > > > > > index c96a25d571c8..62d89f05a801 100644 > > > > > > --- a/include/drm/ttm/ttm_bo_api.h > > > > > > +++ b/include/drm/ttm/ttm_bo_api.h > > > > > > @@ -34,6 +34,7 @@ > > > > > > =A0 #include > > > > > > =A0 #include > > > > > > =A0 #include > > > > > > +#include > > > > > > =A0 #include > > > > > > =A0 #include > > > > > > =A0 #include > > > > > > @@ -486,6 +487,29 @@ static inline void *ttm_kmap_obj_virtual(s= truct > > > > > > ttm_bo_kmap_obj *map, > > > > > > =A0=A0=A0=A0=A0 return map->virtual; > > > > > > =A0 } > > > > > > =A0 +/** > > > > > > + * ttm_kmap_obj_to_dma_buf_map > > > > > > + * > > > > > > + * @kmap: A struct ttm_bo_kmap_obj returned from ttm_bo_kmap. > > > > > > + * @map: Returns the mapping as struct dma_buf_map > > > > > > + * > > > > > > + * Converts struct ttm_bo_kmap_obj to struct dma_buf_map. If t= he memory > > > > > > + * is not mapped, the returned mapping is initialized to NULL. > > > > > > + */ > > > > > > +static inline void ttm_kmap_obj_to_dma_buf_map(struct ttm_bo_k= map_obj > > > > > > *kmap, > > > > > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 struct dma_buf_map *map) > > > > > > +{ > > > > > > +=A0=A0=A0 bool is_iomem; > > > > > > +=A0=A0=A0 void *vaddr =3D ttm_kmap_obj_virtual(kmap, &is_iomem= ); > > > > > > + > > > > > > +=A0=A0=A0 if (!vaddr) > > > > > > +=A0=A0=A0=A0=A0=A0=A0 dma_buf_map_clear(map); > > > > > > +=A0=A0=A0 else if (is_iomem) > > > > > > +=A0=A0=A0=A0=A0=A0=A0 dma_buf_map_set_vaddr_iomem(map, (void _= _force __iomem *)vaddr); > > > > > > +=A0=A0=A0 else > > > > > > +=A0=A0=A0=A0=A0=A0=A0 dma_buf_map_set_vaddr(map, vaddr); > > > > > > +} > > > > > > + > > > > > > =A0 /** > > > > > > =A0=A0 * ttm_bo_kmap > > > > > > =A0=A0 * > > > > > > diff --git a/include/linux/dma-buf-map.h b/include/linux/dma-bu= f-map.h > > > > > > index fd1aba545fdf..2e8bbecb5091 100644 > > > > > > --- a/include/linux/dma-buf-map.h > > > > > > +++ b/include/linux/dma-buf-map.h > > > > > > @@ -45,6 +45,12 @@ > > > > > > =A0=A0 * > > > > > > =A0=A0 *=A0=A0=A0 dma_buf_map_set_vaddr(&map. 0xdeadbeaf); > > > > > > =A0=A0 * > > > > > > + * To set an address in I/O memory, use dma_buf_map_set_vaddr_= iomem(). > > > > > > + * > > > > > > + * .. code-block:: c > > > > > > + * > > > > > > + *=A0=A0=A0 dma_buf_map_set_vaddr_iomem(&map. 0xdeadbeaf); > > > > > > + * > > > > > > =A0=A0 * Test if a mapping is valid with either dma_buf_map_is= _set() or > > > > > > =A0=A0 * dma_buf_map_is_null(). > > > > > > =A0=A0 * > > > > > > @@ -118,6 +124,20 @@ static inline void dma_buf_map_set_vaddr(s= truct > > > > > > dma_buf_map *map, void *vaddr) > > > > > > =A0=A0=A0=A0=A0 map->is_iomem =3D false; > > > > > > =A0 } > > > > > > =A0 +/** > > > > > > + * dma_buf_map_set_vaddr_iomem - Sets a dma-buf mapping struct= ure to > > > > > > an address in I/O memory > > > > > > + * @map:=A0=A0=A0=A0=A0=A0=A0 The dma-buf mapping structure > > > > > > + * @vaddr_iomem:=A0=A0=A0 An I/O-memory address > > > > > > + * > > > > > > + * Sets the address and the I/O-memory flag. > > > > > > + */ > > > > > > +static inline void dma_buf_map_set_vaddr_iomem(struct dma_buf_= map *map, > > > > > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 void __iomem *vaddr_iomem) > > > > > > +{ > > > > > > +=A0=A0=A0 map->vaddr_iomem =3D vaddr_iomem; > > > > > > +=A0=A0=A0 map->is_iomem =3D true; > > > > > > +} > > > > > > + > > > > > > =A0 /** > > > > > > =A0=A0 * dma_buf_map_is_equal - Compares two dma-buf mapping s= tructures > > > > > > for equality > > > > > > =A0=A0 * @lhs:=A0=A0=A0 The dma-buf mapping structure > > > > > _______________________________________________ > > > > > dri-devel mailing list > > > > > dri-devel@lists.freedesktop.org > > > > > https://lists.freedesktop.org/mailman/listinfo/dri-devel > > > > _______________________________________________ > > > > amd-gfx mailing list > > > > amd-gfx@lists.freedesktop.org > > > > https://lists.freedesktop.org/mailman/listinfo/amd-gfx > > > = > > > _______________________________________________ > > > dri-devel mailing list > > > dri-devel@lists.freedesktop.org > > > https://lists.freedesktop.org/mailman/listinfo/dri-devel > > > = > > = > > _______________________________________________ > > amd-gfx mailing list > > amd-gfx@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/amd-gfx > = -- = Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx