From patchwork Wed Nov 20 20:48:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 3215531 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8DC1B9F26C for ; Wed, 20 Nov 2013 20:49:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BB03C20752 for ; Wed, 20 Nov 2013 20:49:47 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id ED9A72074B for ; Wed, 20 Nov 2013 20:49:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D02E8105B32 for ; Wed, 20 Nov 2013 12:49:45 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qa0-f49.google.com (mail-qa0-f49.google.com [209.85.216.49]) by gabe.freedesktop.org (Postfix) with ESMTP id 514C4105AB3 for ; Wed, 20 Nov 2013 12:48:59 -0800 (PST) Received: by mail-qa0-f49.google.com with SMTP id ii20so2124039qab.15 for ; Wed, 20 Nov 2013 12:48:58 -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=DoW9AvyzDck+3WmRkvYhqEy6QL58fYbaO0cx6s5kn/I=; b=xuxJVIoVWrIv7jZEcu2qfBKnBtSL9E0/EICEFOV1RgpRVDXvkionEWHH8qVICtj0Ha j/gieXK0dSUi13qhbzev+witi0t1aY9RF3RCXLtTIHd5ckrguv17zE1z/zuA1Yi8T54a SEb9mg6MFXi+My57BSvL+PCE/53+37hcyvrTUKTtW4h0d8Azt1OhTXzYKYNqMSDB3HWL efiJ5ik4MA13KME9FdgQOlxkcoODQCa7vAvtKXPQhB7RRIvnOFp0B46sYO3+1++uztNR LxVbP+kOMSSGU4qxOCbCGlsNdxnJeSCWjcvfR4YC3YdCTXreUfJ2NKH0+LO8sx+lfB2y ftnQ== X-Received: by 10.224.124.134 with SMTP id u6mr4947733qar.79.1384980538844; Wed, 20 Nov 2013 12:48:58 -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 h2sm25727276qaf.10.2013.11.20.12.48.57 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Nov 2013 12:48:58 -0800 (PST) From: Rob Clark To: dri-devel@lists.freedesktop.org Subject: [RFCv3 14/14] HACK: drm: allow FB's in drm_mode_object_find Date: Wed, 20 Nov 2013 15:48:13 -0500 Message-Id: <1384980493-25499-15-git-send-email-robdclark@gmail.com> X-Mailer: git-send-email 1.8.4.2 In-Reply-To: <1384980493-25499-1-git-send-email-robdclark@gmail.com> References: <1384980493-25499-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+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-4.6 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 8368ef5..f71f7af 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -405,7 +405,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);