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=-7.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=no 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 F0B55C433E3 for ; Sat, 15 Aug 2020 21:59:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CD9DB22D06 for ; Sat, 15 Aug 2020 21:59:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="RTB9HEWh" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729605AbgHOV7r (ORCPT ); Sat, 15 Aug 2020 17:59:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726415AbgHOVvi (ORCPT ); Sat, 15 Aug 2020 17:51:38 -0400 Received: from mail-ot1-x341.google.com (mail-ot1-x341.google.com [IPv6:2607:f8b0:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D493C06135D for ; Fri, 14 Aug 2020 19:19:58 -0700 (PDT) Received: by mail-ot1-x341.google.com with SMTP id q9so9100168oth.5 for ; Fri, 14 Aug 2020 19:19:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kotVL2MVQP+yaUdPHEdye5LclV8vVVPvzmwQlj45VGA=; b=RTB9HEWhawVWaOVivVEaeJlv0EDtpps/Dvnysqh+sfXQcrhgY36YW5WMpXVQ3E03De BfHJGAyPOioZ7kOWqdSQIe2pfq2XEO7q/+kCJMd7WFieWUtZm5DmOQH0cMzm3OFrDfl6 KSF238ON/iriNpjcgkGO8ZZoC2u79B/Xqgw0TVxTQHwU7JtRGkNPhW8vro7AdN+J0S0v xEYUfZVTrcRl3KH3h2RjbwjC7XM0wFl01LmOcUK+u1taG15uYnn7vGR4pA0VoNqSagns N92QFNP5r9ZaE4etZxVqeRGuIt0/ShuHjQ7LIzmqB3JKtaouIOCqUaQVSS8jCnKy63HB eR4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kotVL2MVQP+yaUdPHEdye5LclV8vVVPvzmwQlj45VGA=; b=qQKIVkf4ItpFvNM+yf3wb/z1Frl70L3kt5332jTyX15wfG+Jmdjhasj/qMTe5oqWb4 4Fn+RzfrdzTgKGdGHLb85sPU8US60fqgJGPSrk3pOzaUh2KhZp6GHa93pCYnNlGY85Ux fQzOQacE8qPNnibJGmkaJtbx9BVogK+d+vmIolMF06Cjh85QgXFFcXYp9pVeLBQ+K+ci p2hdeAhkemC3hscVRQxaVUBmjQt+3ZSteuX1cAnHzRPXYqyyHcdS0RbbQmOwgDjtG2De hbjuov9A4TL6V6mn9f2F7YBOwYn+JPg+OJw2FzpDkm82ynskXJsx32KHxFpTtI65Iv+j IiAw== X-Gm-Message-State: AOAM531Q6zhfsMa9NB2/8dSZhzoXF6aKp1Kvc/Oe6LfBKdUE+A9Nihwm lbpBgFLqAi55LmzPtDo+LbBySAYhAuSv/Dba+jJ9nQ== X-Google-Smtp-Source: ABdhPJy+n0F6ds6KPCecQRLWeKyt7/kkaH52AH58xx1rQoWzIvkR4h1GmHPPbdbsDbWnnwEdgh+f7kNaM9jPgYlAeKo= X-Received: by 2002:a9d:6f8f:: with SMTP id h15mr3758994otq.221.1597457997320; Fri, 14 Aug 2020 19:19:57 -0700 (PDT) MIME-Version: 1.0 References: <20200814142516.148934-1-ezequiel@collabora.com> In-Reply-To: <20200814142516.148934-1-ezequiel@collabora.com> From: John Stultz Date: Fri, 14 Aug 2020 19:19:45 -0700 Message-ID: Subject: Re: [PATCH] dma-buf: heap-helpers: Set dma-buf exporter name To: Ezequiel Garcia Cc: linux-media , dri-devel , Sumit Semwal , "Andrew F . Davis" , Benjamin Gaignard , Liam Mark , Laura Abbott , Brian Starkey , kernel@collabora.com Content-Type: text/plain; charset="UTF-8" Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org On Fri, Aug 14, 2020 at 7:25 AM Ezequiel Garcia wrote: > > Currently the heap helper uses DEFINE_DMA_BUF_EXPORT_INFO, > which uses KBUILD_MODNAME for the dma_buf_export_info.exp_name. > > This effectively makes all dma-bufs exported by the heap > helper as coming from "heap-helpers", instead of the actual heap name > (cma, system, etc). > > Fix this by adding a dma-heap name getter, and then setting > dma_buf_export_info.exp_name. > > Signed-off-by: Ezequiel Garcia Untested, but looks sane to me. Acked-by: John Stultz On a slightly related note, I'm starting to regret the current heap-helpers approach (Andrew probably gets an "I told you so" there :). While it avoids a lot of duplication, it's really an all or nothing approach, and doesn't really compare well to other drm style helper functions. I may eventually try to break the system and cma implementations out of the helper code and try to consider a different approach to avoid the duplication. thanks -john 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=-6.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS autolearn=no 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 EBCBAC433DF for ; Sat, 15 Aug 2020 02:20:00 +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 B7C412087D for ; Sat, 15 Aug 2020 02:20:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="RTB9HEWh" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B7C412087D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org 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 659756EC57; Sat, 15 Aug 2020 02:19:59 +0000 (UTC) Received: from mail-ot1-x341.google.com (mail-ot1-x341.google.com [IPv6:2607:f8b0:4864:20::341]) by gabe.freedesktop.org (Postfix) with ESMTPS id 148866EC57 for ; Sat, 15 Aug 2020 02:19:58 +0000 (UTC) Received: by mail-ot1-x341.google.com with SMTP id k12so9135659otr.1 for ; Fri, 14 Aug 2020 19:19:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kotVL2MVQP+yaUdPHEdye5LclV8vVVPvzmwQlj45VGA=; b=RTB9HEWhawVWaOVivVEaeJlv0EDtpps/Dvnysqh+sfXQcrhgY36YW5WMpXVQ3E03De BfHJGAyPOioZ7kOWqdSQIe2pfq2XEO7q/+kCJMd7WFieWUtZm5DmOQH0cMzm3OFrDfl6 KSF238ON/iriNpjcgkGO8ZZoC2u79B/Xqgw0TVxTQHwU7JtRGkNPhW8vro7AdN+J0S0v xEYUfZVTrcRl3KH3h2RjbwjC7XM0wFl01LmOcUK+u1taG15uYnn7vGR4pA0VoNqSagns N92QFNP5r9ZaE4etZxVqeRGuIt0/ShuHjQ7LIzmqB3JKtaouIOCqUaQVSS8jCnKy63HB eR4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kotVL2MVQP+yaUdPHEdye5LclV8vVVPvzmwQlj45VGA=; b=kquJcR/hmhVbMohHLkblgRTa4OR+WrCv9I72uV56hTqiIiWsTu8/pAwlTeJ2XVVhyS wHh7/gSnOeZGw4f/gwGN8QdEysxeWN9nyuRvfIEORLOF8Gv4dvhnB+tYbfknv8iAG8A/ 2DJFsNhTNZV5+zxzfIMUtmQulidELtjh9BSXg4+7gjRC4mMyNinGRh/FkKINoo3TV8CW MAKzkxHe1B1mXqiI4m6TEHQflRh3foLVOHpvMCnQNWyi/YCM4l9XInG3A+3OifdxOTU+ KpXncWJMKS5m9ORArlWOt4/f0jtMyTaWbOpyRw/Q6m9bB2v5M7KOM5EVbYSKqsn/BFvT Iidw== X-Gm-Message-State: AOAM533YRWzAAOF+p1E1A/b7j5JyPm0xCKueogFROIuYNiuCSoOPZl28 W8n16BsbN1hLIfx7Ik2WjWa9D4oVf1DDMjlmj3f6nA== X-Google-Smtp-Source: ABdhPJy+n0F6ds6KPCecQRLWeKyt7/kkaH52AH58xx1rQoWzIvkR4h1GmHPPbdbsDbWnnwEdgh+f7kNaM9jPgYlAeKo= X-Received: by 2002:a9d:6f8f:: with SMTP id h15mr3758994otq.221.1597457997320; Fri, 14 Aug 2020 19:19:57 -0700 (PDT) MIME-Version: 1.0 References: <20200814142516.148934-1-ezequiel@collabora.com> In-Reply-To: <20200814142516.148934-1-ezequiel@collabora.com> From: John Stultz Date: Fri, 14 Aug 2020 19:19:45 -0700 Message-ID: Subject: Re: [PATCH] dma-buf: heap-helpers: Set dma-buf exporter name To: Ezequiel Garcia 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: Liam Mark , "Andrew F . Davis" , dri-devel , Laura Abbott , kernel@collabora.com, linux-media Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Fri, Aug 14, 2020 at 7:25 AM Ezequiel Garcia wrote: > > Currently the heap helper uses DEFINE_DMA_BUF_EXPORT_INFO, > which uses KBUILD_MODNAME for the dma_buf_export_info.exp_name. > > This effectively makes all dma-bufs exported by the heap > helper as coming from "heap-helpers", instead of the actual heap name > (cma, system, etc). > > Fix this by adding a dma-heap name getter, and then setting > dma_buf_export_info.exp_name. > > Signed-off-by: Ezequiel Garcia Untested, but looks sane to me. Acked-by: John Stultz On a slightly related note, I'm starting to regret the current heap-helpers approach (Andrew probably gets an "I told you so" there :). While it avoids a lot of duplication, it's really an all or nothing approach, and doesn't really compare well to other drm style helper functions. I may eventually try to break the system and cma implementations out of the helper code and try to consider a different approach to avoid the duplication. thanks -john _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel