Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1267924pxb; Thu, 21 Oct 2021 19:58:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxhstAL5G6VLAi9xk17eHaUlH8Fb4J3Q6jp9L4X6rl+iyiBE6Bs70zIXISXilvJrhrgWioA X-Received: by 2002:a05:6a00:1407:b0:44c:d2cc:916e with SMTP id l7-20020a056a00140700b0044cd2cc916emr9630075pfu.64.1634871511205; Thu, 21 Oct 2021 19:58:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634871511; cv=none; d=google.com; s=arc-20160816; b=MkdLlTO+gdoTD6Aoygkf1GgrG4ZcORO15YMwY96hxOM0zbV0wAfji/JRVwdTChiIH9 a7NHm2BEoM7IMjXReZAcB4Kb0D1uSe11FxKVI07sdVYeseSLTdC3u1STKN/an8dGWGpE ccZl2NU8XaRRToNdW+XYKAUolZYKkbicDMA9WOSw1PPaLMEq5jp3OwHcLm8mb2Hh0Lld 5DpqInVzCJxlQO3LR94L61xfpwYqFEwDC4O1AU+gPGWbtmeP3O4/pli++jQDIJ4oT29k DWSOc7t90kTTJbe78eQqkQcJMLgPx/0AjjySTC+nSNqRgyJLmziFEv+rVmwOQNLMoiCP YQqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=rQ7tR0Yp6rf1GJIW4s5NegDfNukJ5qAaGOcznVi/4fI=; b=fXZnPiiMVufSa/7sdVcndlOXBi2V1I6nWs3O3GZDoQqR7MF6QshBF42gJEhop3mgON 15+5AhK7UH2uqKxG96WF/BpZz3pZe3m1m5bpbBR9mAljE3uKkhOThxEaCl7zz9bbraqV +rbUPZtBq6C5DAkFKQMgDGtK2j78eekrPYBHy57PCueQVGPEHKy4ACuzxnSEzbQgY7KJ C38Ttwe8OwafXL8COkWV7n1A2kRM7Dui0xVi4mPQJHSmMl9S9VqYKobg0FlmZXBmyyMd SaMEqjzhcUi4l7zVJT1gtbB/659zmTA/qqTAgndlii5QGGpHqsuL7NinpRJfSDV/Owpn Xk7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=h+Hl0emi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c11si11247900pgw.198.2021.10.21.19.58.18; Thu, 21 Oct 2021 19:58:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=h+Hl0emi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232633AbhJVC7Y (ORCPT + 99 others); Thu, 21 Oct 2021 22:59:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232626AbhJVC7X (ORCPT ); Thu, 21 Oct 2021 22:59:23 -0400 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ACCC6C061764 for ; Thu, 21 Oct 2021 19:57:06 -0700 (PDT) Received: by mail-lf1-x130.google.com with SMTP id br29so2200120lfb.7 for ; Thu, 21 Oct 2021 19:57:06 -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=rQ7tR0Yp6rf1GJIW4s5NegDfNukJ5qAaGOcznVi/4fI=; b=h+Hl0emiqAK+B5ocs80eCdhcXRzi5YMDF968lXPzFxnEUEjZNCV6OZuT38DosVDCnX 2kd2/6AfNusMc5xZkJ8N/9HOLbumhVHkRiVl+pTu0p8c76KiiCFvZP6csq8e5XzeKi6s NKzG9bxPFLEFUUM8MXoHHRBH58n0tfALyHZLNCEXPuZAdHp3IgWsrEtLaIcl/FQ/twrr hIQ2l5UiMMeYimNmh9FL25L+JI1EsizIDwRoXofARqjCqxBLfJa5U+iVP1afhGBSql/i LQLgTmVowuxTC7rnceq7K+q0QmfkhwHTbf/RdNNeDinD5gd8YVstgSuB3dBRn2olMQi3 IFxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rQ7tR0Yp6rf1GJIW4s5NegDfNukJ5qAaGOcznVi/4fI=; b=c1R1AS//1UwvvSi6KAp82Qq8azLLD0p/GYz5QOftn3H3qaZdVpdA758SzqRub8hSta MvkacxyfzllB+F5eRzoDs4ODY4z944p7AT5RJCt8wjdaallg2xDI0lH6WhhOcic0pjYv LzyiFSRfztgeOslwsHUpw/rsxt4TI5OQKlyw2JcyvCyArw63b6wYs9RQNbozlwgmzes8 0grZiUtkOuV2RHW6nGkAVb0WoJOxVqlRJNMApvY8bROH8+rCHdsW/cQ5fCT8R4PWDRXm NDOSXRllur4HQBmycUgwzBAIyLSYdg/vlZDeZG6ULb1Om1FDXW8cxMzcrbGLSMxwVQZs W1MQ== X-Gm-Message-State: AOAM530TmHDzt9H6afp0CA6DppcI+Wv+DWPVCIR5VOGmnb1AmFacor29 R4RzMk0yK/z6GJiRxmTsqwL8hEndfHUlz2VS/K8cmg== X-Received: by 2002:a05:6512:3191:: with SMTP id i17mr8670014lfe.485.1634871425112; Thu, 21 Oct 2021 19:57:05 -0700 (PDT) MIME-Version: 1.0 References: <20211022014850.22933-1-huangshuosheng@allwinnertech.com> In-Reply-To: <20211022014850.22933-1-huangshuosheng@allwinnertech.com> From: John Stultz Date: Thu, 21 Oct 2021 19:56:54 -0700 Message-ID: Subject: Re: [PATCH v2] dma-buf: heaps: init heaps in subsys_initcall To: Shuosheng Huang Cc: Sumit Semwal , Liam Mark , Laura Abbott , Brian Starkey , Christian Koenig , linux-media , dri-devel , lkml Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 21, 2021 at 6:49 PM Shuosheng Huang wrote: > > Some built-in modules will failed to use dma-buf heap to allocate > memory if the heap drivers are too late to be initialized. > To fix this issue, move initialization of dma-buf heap drivers in > subsys_initcall() which is more earlier to be called. Hey! Thanks so much for sending this out! I appreciate it! So the change looks pretty straightforward to me, however, the rationale for it is where we hit problems. With the upstream kernel, there are not yet any modules that directly allocate from dmabuf heaps. So in the context of the upstream kernel, the reasoning doesn't make much sense. Now, I know folks have their own drivers that want to allocate from dmabuf heaps, but those haven't been submitted upstream yet. So maybe can you submit those patches that need this along with this change so it would make sense as part of a patch series? It would be trivial to justify including this patch then. thanks -john