From patchwork Mon Nov 25 14:47:38 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 3232711 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 404AFC045B for ; Mon, 25 Nov 2013 14:50:35 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B13192018B for ; Mon, 25 Nov 2013 14:50:30 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 241A02010E for ; Mon, 25 Nov 2013 14:50:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A6538FA85D; Mon, 25 Nov 2013 06:50:23 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qe0-f53.google.com (mail-qe0-f53.google.com [209.85.128.53]) by gabe.freedesktop.org (Postfix) with ESMTP id E64FAFA772 for ; Mon, 25 Nov 2013 06:48:28 -0800 (PST) Received: by mail-qe0-f53.google.com with SMTP id nc12so2423180qeb.12 for ; Mon, 25 Nov 2013 06:48:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=i+eoFlQLfdYjjBcA2+6urag0+5hKiFCzxzxTurCKlNc=; b=dtrD1wCGtN6p2KJFM37Ri9xLhiv4KRjV0MWgDNPa0XrIs5+omHi/g8eL2ImDarxyoe NzIY6QjRw01Ly5R1OP+jFhHuUvdygRGVa9eS5ocQq9BiZ2JrxjyKj1iCA8lfTFuEM8wX NaYkhb/5PyOY/n3ynpcZqIImK/h0IAgo3O5tbQ2wa49WFiZsr6SxI97364irqppU6BM+ 8SYHoHPJl3ESgQVMfVK45gbwFC5N1+NRv4lVSvv3uJ5xqORXBwid2we9j2V7XZNtdHVR IYxuy5AmFzfyAICIcrCkfKrDJ7qLTcJbD9MnQAahct9ao+0tksHXOUvPy3BqgLIdkDF+ 9qOw== X-Received: by 10.224.151.79 with SMTP id b15mr15283939qaw.28.1385390908560; Mon, 25 Nov 2013 06:48:28 -0800 (PST) Received: from localhost (pool-108-20-250-166.bstnma.east.verizon.net. [108.20.250.166]) by mx.google.com with ESMTPSA id a9sm115307297qed.6.2013.11.25.06.48.27 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Nov 2013 06:48:27 -0800 (PST) From: Rob Clark To: dri-devel@lists.freedesktop.org Subject: [RFCv4 14/14] HACK: drm: allow FB's in drm_mode_object_find Date: Mon, 25 Nov 2013 09:47:38 -0500 Message-Id: <1385390858-4412-15-git-send-email-robdclark@gmail.com> X-Mailer: git-send-email 1.8.4.2 In-Reply-To: <1385390858-4412-1-git-send-email-robdclark@gmail.com> References: <1385390858-4412-1-git-send-email-robdclark@gmail.com> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Ugg.. we do actually want to permit FB's in atomic case, since FB will be looked up like any other object property value. Currently we do the FB refcnt'ing dance in atomic->commit(), and would rather not have to special case FB's or collect an FB ref when we look up the property. Not sure if it is better to rework the atomic FB refcnt'ing or loosen this restriction? --- drivers/gpu/drm/drm_crtc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index 8158250..e57b7eb 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -441,7 +441,7 @@ struct drm_mode_object *drm_mode_object_find(struct drm_device *dev, /* Framebuffers are reference counted and need their own lookup * function.*/ - WARN_ON(type == DRM_MODE_OBJECT_FB); +// WARN_ON(type == DRM_MODE_OBJECT_FB); mutex_lock(&dev->mode_config.idr_mutex); obj = idr_find(&dev->mode_config.crtc_idr, id);