From patchwork Tue Jun 16 11:47:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 11607229 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 77E9460D for ; Tue, 16 Jun 2020 11:47:38 +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 564422074D for ; Tue, 16 Jun 2020 11:47:38 +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="Nem7EWZ0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 564422074D 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 B25936E8A2; Tue, 16 Jun 2020 11:47:32 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by gabe.freedesktop.org (Postfix) with ESMTPS id 205C36E0DA for ; Tue, 16 Jun 2020 11:47:31 +0000 (UTC) Received: by mail-wm1-x342.google.com with SMTP id c71so2562211wmd.5 for ; Tue, 16 Jun 2020 04:47:31 -0700 (PDT) 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=j2wfZA5WI4nz3odeav6s5+urxP6LNN0UmYcHrvMekhM=; b=Nem7EWZ04lSzVQpi/+mFBS0Y5tpSp1aH8a1UFxshKJ4ToCu01GQyxqWfsfVBdVufYQ /aBErajXoswnyeuwL3Sng/RBJZxODlmnTEsDRLqaXr+ZmBu/P9KkaetUP5a8nHUdkySa WDAkVG+cyU105U8LEj/pRHWvD2b40EMNXD7iM= 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=j2wfZA5WI4nz3odeav6s5+urxP6LNN0UmYcHrvMekhM=; b=nDWbjIHYraItKI5RMQhvJi5rvP/jA6crVQhG7oG2IzTJIG5/SwuLhRKBVr+LNPg3OQ UMxiHbL5CXiKosDHKrHGZq31Nbp3yNgfrBL3Tpr0ghQ1r3weJ8Xam/9FzVnDg8RQNTTJ 6mIBg3OfPC2ijzbKHZn2VxVR0f2B/C/oqRkhIxzfJjhq5lpIywxwZn/ibC5yViATR2vD o4gas2E1qsoXzuxF94FtZRZyxyIVS9kCUNUyoFBdFirRWaNQe4lQQHWDpcYi1wBF7ElS E3lpoOdDB9PP02IDcj3dVIJI1xFE6M8VY0yW882dDx3IdvyuoQ4CQC5tZR48oi6WERyI VjGA== X-Gm-Message-State: AOAM533MbtwQguH2RNbD7zhnCMdsxM+Oyt2VLgllj5h4w55JFY/VLVce 2k+ouRZwizianVn+8INjCsOrYBYzJNk= X-Google-Smtp-Source: ABdhPJxVBD/ZgLzZC5H1ezELlYrgoR/76Dwfsn28V9iDtijAl8ddooJfSX/tg01bCLlKOqvGQqvz6g== X-Received: by 2002:a1c:2c45:: with SMTP id s66mr3002201wms.40.1592308049419; Tue, 16 Jun 2020 04:47:29 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id h7sm3863726wml.24.2020.06.16.04.47.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 16 Jun 2020 04:47:28 -0700 (PDT) From: Daniel Vetter To: DRI Development Subject: [PATCH] drm/shmem-helper: Only dma-buf imports are private obj Date: Tue, 16 Jun 2020 13:47:23 +0200 Message-Id: <20200616114723.2363268-1-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.27.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: Daniel Vetter , Intel Graphics Development , Boris Brezillon , Gerd Hoffmann , Thomas Zimmermann , Daniel Vetter Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" I broke that in my refactoring: commit 7d2cd72a9aa3df3604cafd169a2d4a525afb68ca Author: Daniel Vetter Date: Fri May 29 16:05:42 2020 +0200 drm/shmem-helpers: Simplify dma-buf importing I'm not entirely sure of the history here, but I suspect that in one of the rebases or when applying the patch I moved the hunk from drm_gem_shmem_prime_import_sg_table(), where it should be, to drm_gem_shmem_create_with_handle(), which is totally wrong. Remedy this. Thanks for Thomas for the crucual hint in debugging this. Reported-by: Thomas Zimmermann Fixes: 7d2cd72a9aa3 ("drm/shmem-helpers: Simplify dma-buf importing") Cc: Boris Brezillon Cc: Thomas Zimmermann Cc: Gerd Hoffmann Cc: Rob Herring Cc: Noralf Trønnes Signed-off-by: Daniel Vetter Tested-by: Thomas Zimmermann Reviewed-by: Thomas Zimmermann --- drivers/gpu/drm/drm_gem_shmem_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_gem_shmem_helper.c b/drivers/gpu/drm/drm_gem_shmem_helper.c index 0a7e3b664bc2..837e0840990c 100644 --- a/drivers/gpu/drm/drm_gem_shmem_helper.c +++ b/drivers/gpu/drm/drm_gem_shmem_helper.c @@ -377,7 +377,7 @@ drm_gem_shmem_create_with_handle(struct drm_file *file_priv, struct drm_gem_shmem_object *shmem; int ret; - shmem = __drm_gem_shmem_create(dev, size, true); + shmem = drm_gem_shmem_create(dev, size); if (IS_ERR(shmem)) return shmem; @@ -730,7 +730,7 @@ drm_gem_shmem_prime_import_sg_table(struct drm_device *dev, size_t size = PAGE_ALIGN(attach->dmabuf->size); struct drm_gem_shmem_object *shmem; - shmem = drm_gem_shmem_create(dev, size); + shmem = __drm_gem_shmem_create(dev, size, true); if (IS_ERR(shmem)) return ERR_CAST(shmem);