From patchwork Fri Jan 22 13:36:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 12039461 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=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 24489C433E6 for ; Fri, 22 Jan 2021 13:36:34 +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 C1725238EE for ; Fri, 22 Jan 2021 13:36:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C1725238EE 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 05BAB6EA01; Fri, 22 Jan 2021 13:36:33 +0000 (UTC) Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by gabe.freedesktop.org (Postfix) with ESMTPS id 04BBF6EA01 for ; Fri, 22 Jan 2021 13:36:31 +0000 (UTC) Received: by mail-wm1-x32a.google.com with SMTP id m2so4337810wmm.1 for ; Fri, 22 Jan 2021 05:36:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=edG1bcKl/JltMmw8l3x2znGINV2sLZxwkYJ8IRqXyp4=; b=QAgz2EzaBlKwijAgAQpl6fX2ZKyUP4Vt+msdnx4A5y5bo6FldmRBNMpJDtqtar9arz E4tu8bXvgQDwpg9+YC8HyVujuwbaXSsEBW3JnMWcsvkgXskLMtDPf7FvHBUSs7Qn8KMV YXo4RpK0uOHegM18CS014aqDUxy5uVGc92ctQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=edG1bcKl/JltMmw8l3x2znGINV2sLZxwkYJ8IRqXyp4=; b=dC9nKuN0cPoiPn07w02mLKZV9nOW9bGSBKlBz5aIJgpsFAAR1z4KqMKzB4+8SPA0BZ RhS86XdcrQkRweldPE2XHbzt+B1b4jnRnlqIb814VqWCcoySy01owxv5f81xvUdU564B Q7LSDxQlyAGdGp74qnb+CZOGxomRLftkGtutuH6xdm3F8FoLiuv3G+wZ1L8tNuU18yIb sZ62E9BO6i1VCjYMWSBQ/3uqbQUxjDLz/X+u0H4tZpX2maw3gTnkKfENEgbyJRv1RSGt CaXeOn4s/20y/6Iwq1XpoQUABrjVbtg2M2KVRDslTxiCa2NCYnF8b2zJu8zSIL0Nm4mC ktIQ== X-Gm-Message-State: AOAM532FzpzTnVDH8JE6ybqLQcPMMYJWTA08YrdBgiBErmsfvWXnXXbK kf19CdU/HrKX1/PRYHi050Vt6Mk7M8fpsNnN X-Google-Smtp-Source: ABdhPJyqUays+vT7bQV8b2GQBF2WkY4wYp/uur4k09VBD0DwleCxtfjPL3RB07HyZym+ymor5fJfww== X-Received: by 2002:a7b:cd8e:: with SMTP id y14mr4119720wmj.61.1611322590741; Fri, 22 Jan 2021 05:36:30 -0800 (PST) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id i131sm10939005wmi.25.2021.01.22.05.36.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Jan 2021 05:36:30 -0800 (PST) From: Daniel Vetter To: DRI Development Subject: [PATCH] drm/todo: Add entry for moving to dma_resv_lock Date: Fri, 22 Jan 2021 14:36:23 +0100 Message-Id: <20210122133624.1751802-1-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.30.0 MIME-Version: 1.0 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: David Airlie , Daniel Vetter , =?utf-8?q?Christian_K=C3=B6nig?= , linaro-mm-sig@lists.linaro.org, Thomas Zimmermann , Daniel Vetter , linux-media@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Requested by Thomas. I think it justifies a new level, since I tried to make some forward progress on this last summer, and gave up (for now). This is very tricky. Signed-off-by: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: "Christian König" Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Acked-by: Thomas Zimmermann --- Documentation/gpu/todo.rst | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Documentation/gpu/todo.rst b/Documentation/gpu/todo.rst index dea9082c0e5f..f872d3d33218 100644 --- a/Documentation/gpu/todo.rst +++ b/Documentation/gpu/todo.rst @@ -23,6 +23,9 @@ Advanced: Tricky tasks that need fairly good understanding of the DRM subsystem and graphics topics. Generally need the relevant hardware for development and testing. +Expert: Only attempt these if you've successfully completed some tricky +refactorings already and are an expert in the specific area + Subsystem-wide refactorings =========================== @@ -168,6 +171,22 @@ Contact: Daniel Vetter, respective driver maintainers Level: Advanced +Move Buffer Object Locking to dma_resv_lock() +--------------------------------------------- + +Many drivers have their own per-object locking scheme, usually using +mutex_lock(). This causes all kinds of trouble for buffer sharing, since +depending which driver is the exporter and importer, the locking hierarchy is +reversed. + +To solve this we need one standard per-object locking mechanism, which is +dma_resv_lock(). This lock needs to be called as the outermost lock, with all +other driver specific per-object locks removed. The problem is tha rolling out +the actual change to the locking contract is a flag day, due to struct dma_buf +buffer sharing. + +Level: Expert + Convert logging to drm_* functions with drm_device paramater ------------------------------------------------------------