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=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no 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 ADF5DC433ED for ; Fri, 23 Apr 2021 17:53:41 +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 709B56144A for ; Fri, 23 Apr 2021 17:53:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 709B56144A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com 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 D60796E091; Fri, 23 Apr 2021 17:53:40 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 91A5B6E091 for ; Fri, 23 Apr 2021 17:53:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1619200418; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iMN2vr30yb/ELiIJb3jXFJDgM9IBXB6WS94R3EgBst0=; b=QTgKjEO9QviHC202r72SLho/D8bidgBP99vm4U8ejzjwDsIPB1pdOng81Zy8JSkIGhnUPV KvPe2XzDCxS8k/CagOOVUO1xPI0+BlqrbMTKrNuozFxD8XwC1QGgtAv6CiHDJfZjVwYem1 Uz/IvW396a/sb7B6AlYMvEbx78RqvQo= Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-134-okdhZTNAPaKi-XQDX5qLCw-1; Fri, 23 Apr 2021 13:53:36 -0400 X-MC-Unique: okdhZTNAPaKi-XQDX5qLCw-1 Received: by mail-qk1-f198.google.com with SMTP id t126-20020a37aa840000b02902e3c5b3abeaso12250760qke.10 for ; Fri, 23 Apr 2021 10:53:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:organization:user-agent:mime-version :content-transfer-encoding; bh=iMN2vr30yb/ELiIJb3jXFJDgM9IBXB6WS94R3EgBst0=; b=MvGwMeJ7QYVGXBmkv2XqMneWL8KJE/L1fBKqf6Uvsw7cxttXHkrZnniet6l0X1gZ3h UMlIPSdTuoWThXFodPUeo7Ag+iFwQ20ieORZkGjPjKyVTEYLthiyt1+8O2mRt+bQEnJv qVv5g4k94naq4qJ7NueVD0jtX41fojwYokdMYEYUYTwYuVAAMQuIzb72hWalbkjZhcgd /FSE1End/g5JmXeMGo3FS78/4CQCIgEcqLw9OffOpOnDHqJhUNxcbnb4STEL3JdfMjoT D4Z1WkD5pu5EvXSvLFNfm5JIkiZqAk0dSSWu8MDcA7oyFSuJTk7dgHXDLfNQy4hq9wF2 Cy6Q== X-Gm-Message-State: AOAM530OC7ayOw3UlbQCHJPnWomcGQy+CFmU6stYLXszKcDySd1q69eg 3Rv2SRS3qZ25lLKdzAWsFglJqIO0ZL54OnvxrEhKfCKUcnYPAn1KljsVAvBxTi+Zb0+l1UBBWm8 xZbDzdFw03YkVLqM6/KUjSJ/504bS X-Received: by 2002:a0c:dc11:: with SMTP id s17mr5457289qvk.18.1619200415940; Fri, 23 Apr 2021 10:53:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTUVUlVfoiWl//W0HjPD0d13jw9avPkrwnpeZvBDIw6oqnKzSgsucO2i02vJ5q3mqdmlhTGw== X-Received: by 2002:a0c:dc11:: with SMTP id s17mr5457242qvk.18.1619200415744; Fri, 23 Apr 2021 10:53:35 -0700 (PDT) Received: from Ruby.lyude.net (pool-108-49-102-102.bstnma.fios.verizon.net. [108.49.102.102]) by smtp.gmail.com with ESMTPSA id c5sm4715913qkl.7.2021.04.23.10.53.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Apr 2021 10:53:35 -0700 (PDT) Message-ID: Subject: Re: [PATCH v3 03/20] drm/dp: Move i2c init to drm_dp_aux_init, add __must_check and fini From: Lyude Paul To: Thierry Reding Date: Fri, 23 Apr 2021 13:53:33 -0400 In-Reply-To: References: <20210419225523.184856-1-lyude@redhat.com> <20210419225523.184856-4-lyude@redhat.com> <56a931c9f284ee6a23583eb3dc59de4afaa60e93.camel@redhat.com> <2e211a6623664714af1d180eadcd74aa7ef417db.camel@redhat.com> <17aa145e4cfa3d8852f7411067c5c37bff771b16.camel@redhat.com> Organization: Red Hat User-Agent: Evolution 3.38.4 (3.38.4-1.fc33) MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=lyude@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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: Neil Armstrong , David Airlie , nouveau@lists.freedesktop.org, Guido =?ISO-8859-1?Q?G=FCnther?= , Oleg Vasilev , dri-devel@lists.freedesktop.org, Meenakshikumar Somasundaram , Andrzej Hajda , Aurabindo Pillai , Thierry Reding , Laurent Pinchart , Sam Ravnborg , Tomi Valkeinen , Parshuram Thombare , Rodrigo Siqueira , Michal Simek , amd-gfx@lists.freedesktop.org, Jonathan Hunter , Luben Tuikov , Ben Skeggs , Swapnil Jakhade , Thomas Zimmermann , Jonas Karlman , Leo Li , intel-gfx@lists.freedesktop.org, Joe Perches , Yuti Amonkar , Rodrigo Vivi , Mikita Lipski , Sean Paul , Navid Emamdoost , Jernej Skrabec , Chris Park , Eryk Brol , Hyun Kwon , Robert Foss , Julia Lawall , Boris Brezillon , Alex Deucher , Christian =?ISO-8859-1?Q?K=F6nig?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Fri, 2021-04-23 at 14:39 +0200, Thierry Reding wrote: > > I'm curious: how is a DP AUX adapter reference count going to solve the > issue of potentially registering devices too early (i.e. before the DRM > is registered)? > > Is it because registering too early could cause a reference count > problem if somebody get a hold of the DP AUX adapter before the parent > DRM device is around? Well currently the problem is that we kind of want to avoid setting up the i2c adapter before the DRM driver is registered with userspace, but it's not really possible to do that if we need the core device struct for the ddc adapter initialized so that tegra can call get_device() on it in drivers/gpu/drm/tegra/sor.c. So my thought is instead of calling get_device() on the ddc adapter that the AUX channel provides, why not just call it on the actual platform device that implements the AUX channel instead? I think this should work pretty nicely while still preventing the platform device for the AUX channel from disappearing before the SOR has disappeared. > > Thierry -- Cheers, Lyude Paul (she/her) Software Engineer at Red Hat _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel