Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp1578686pxy; Fri, 23 Apr 2021 11:23:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyF7F2uYj2GQFlY7/dV/JAbgCD5vvGQiwtj90703jmC1mS50zviY9qJq2I+bu9Nvq1II+f2 X-Received: by 2002:aa7:d284:: with SMTP id w4mr6216934edq.40.1619202209932; Fri, 23 Apr 2021 11:23:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619202209; cv=none; d=google.com; s=arc-20160816; b=Je4isIVxorZ1clnn+FJOEPuwcxS9yEubeU6Mgc6/nhkn8ElSTegXKFgy3olhzfqfvG Bucp5KACuscZQUpcOqgiz1cvuxKlaJSEbbkGAllROO63MgXV/NrypnmBK28bnCvAXr1a LYbKVcI7MxUdRNejvnljBtWR3Jhk3DYjloWRTOTwvajNnQzaOhDZ7joMNtJTu9v22TJR 819vJCAUtWchPK8kg5zKCW7/0T0DHzDsE6bTasJFXkTXVgphO9rXiweT7Le5LSUgJeTS AYI4f0xoh1XCJSf781cNmrNDi9QrZfbIRzNqN8qWWZ2UZI8ALRyFvLrjrcEZB4x2aGvb 8IJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=5hFClZUo+ZUrVv6GNReQdb27crFUBCckSOkdFq2klEc=; b=kE1WkZnuCvVQKecXqLy1xIQ5jokcxJhsWQLS+p3GrCmXQPmnWkAZs7H/zn69FsMA6y hGcIhnWwbs//13pSsD22iBZfBkVgyK+MpCkXJqRrQpOj/MCittYoryFMys8cgb+X1EML Qr7J6hxA0RnkWmbehq7ZbufMmIRM2F6v4C1wbABLB28LLLaBkm+DDsN2IjmtzqOahncN lV2BR23rysuoMXnZRQfx4ucGFWVKZ543KivKu+5nBlqJKJKgrDzL7xA/rCq1cwBzlOsz xUV4Cxh8pWkA9+KFBJfov02B5Me/e563wOUJqdi07v+gAb03v+1NnmmQnqRWM3ymspGO dafQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=aKaSZ2bs; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g10si5525296eds.556.2021.04.23.11.23.04; Fri, 23 Apr 2021 11:23:29 -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=@redhat.com header.s=mimecast20190719 header.b=aKaSZ2bs; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243546AbhDWSWo (ORCPT + 99 others); Fri, 23 Apr 2021 14:22:44 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:54767 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231728AbhDWSWn (ORCPT ); Fri, 23 Apr 2021 14:22:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619202126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5hFClZUo+ZUrVv6GNReQdb27crFUBCckSOkdFq2klEc=; b=aKaSZ2bs2suhg9pojgZc4r/lwi9KzkZ2RQuxApIwf1qvFsdLAMB5KQ7i01QvQWhxo6Kovt 8Hcvt1W5qyzZH2MwNbF3sY6JGGdJPtCgA/w/8oaKmOW74rNpJIE4wATqwdiy893YdPGiXm 4pqRL/e7Zg84U40OVUynRz9FivrSN14= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-472-0TDybKMoMemyOfKuO8aJdQ-1; Fri, 23 Apr 2021 14:22:04 -0400 X-MC-Unique: 0TDybKMoMemyOfKuO8aJdQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C1F9D81746C; Fri, 23 Apr 2021 18:22:02 +0000 (UTC) Received: from Ruby.lyude.net (ovpn-114-74.rdu2.redhat.com [10.10.114.74]) by smtp.corp.redhat.com (Postfix) with ESMTP id A371960613; Fri, 23 Apr 2021 18:22:01 +0000 (UTC) From: Lyude Paul To: linux-tegra@vger.kernel.org, dri-devel@lists.freedesktop.org Cc: Thierry Reding , =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= , Thierry Reding , Jonathan Hunter , David Airlie , Daniel Vetter , linux-kernel@vger.kernel.org (open list) Subject: [PATCH 1/2] drm/tegra: Get ref for DP AUX channel, not its ddc adapter Date: Fri, 23 Apr 2021 14:21:45 -0400 Message-Id: <20210423182146.185633-2-lyude@redhat.com> In-Reply-To: <20210423182146.185633-1-lyude@redhat.com> References: <20210423182146.185633-1-lyude@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org While we're taking a reference of the DDC adapter for a DP AUX channel in tegra_sor_probe() because we're going to be using that adapter with the SOR, now that we've moved where AUX registration happens the actual device structure for the DDC adapter isn't initialized yet. Which means that we can't really take a reference from it to try to keep it around anymore. This should be fine though, because we can just take a reference of its parent instead. Signed-off-by: Lyude Paul Fixes: 39c17ae60ea9 ("drm/tegra: Don't register DP AUX channels before connectors") Cc: Lyude Paul Cc: Thierry Reding Cc: Jonathan Hunter Cc: dri-devel@lists.freedesktop.org Cc: linux-tegra@vger.kernel.org --- drivers/gpu/drm/tegra/sor.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c index 7b88261f57bb..4e0e3a63e586 100644 --- a/drivers/gpu/drm/tegra/sor.c +++ b/drivers/gpu/drm/tegra/sor.c @@ -3739,11 +3739,11 @@ static int tegra_sor_probe(struct platform_device *pdev) if (!sor->aux) return -EPROBE_DEFER; - if (get_device(&sor->aux->ddc.dev)) { - if (try_module_get(sor->aux->ddc.owner)) + if (get_device(sor->aux->dev)) { + if (try_module_get(sor->aux->dev->driver->owner)) sor->output.ddc = &sor->aux->ddc; else - put_device(&sor->aux->ddc.dev); + put_device(sor->aux->dev); } } -- 2.30.2