Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4715442ybi; Tue, 28 May 2019 01:07:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqyIgKT5WgvGgFg+8tgF9QX3JqUJfiJ/ppFqecZv/yjiPKaFTqk9Y7z5XLvfLGrBM32NpV9B X-Received: by 2002:a17:90a:ae10:: with SMTP id t16mr3887236pjq.51.1559030860436; Tue, 28 May 2019 01:07:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559030860; cv=none; d=google.com; s=arc-20160816; b=PiWh0v5ou3XBdJJ81SRrwOJbmbk25tn36L8l7OBzsJagSOUeio8G7oYjqF+KLXEbCQ WZ7rRgTZ95x3Z0qCx0R4g9MATCue77+fPL7kR4S7YQVms9Eu5bnewfiu4b3TLmCuGmel LF4fBKBeMK4+FluEdmyBC5BHfMUGyIY6iUgEGn1B6V1+xUk6952GKm7T8m3LrWQVsxzd 1JCMvlBZp6Ue58FBpfgls0nrNKnZW0LyQ/MjtKslpY026vYVA1Qo2Du2GRXop+hEF0dK 4u9VFLuYLkKlJXmm5a2vXhY27i3BqQYbqCbJiBjYR3zeOHeFmGYjG/aErArWopIXFaoo 2uMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=TZaJWFQRYKJBYptarPqscCKHTD4Bsp5nCBSNDleFbfk=; b=AYk4XuBSro8MtaJXzWxRLtd2FeRsVBYscB77vldfKE7J+6u/Wi4O65/LfLDkvuFLQl fk0CYRHl8p0Pl3apXB3baSxGt5I2zvJwk7jAIGS+U1MqAt8PU+6BCjwnSRDHpH/r5qfA lRl3FvjZW11u4FFq/8ylfXhTTHix1xXZBOKhoqwVqQBuhB1MnNGXCA3VYS6MkwLv/rpL j+NarAefcutOP380+dsfC9RmeTs59g72I1MmnAs4TUje+RCT2Wv3M/iJMep2ZuSj3xyu dAnxWbS3amWkTArWON+1hVpf+8cPt+DGPrijjwbPTcw1pohJjI7EI4Y4SlBPbzoU+Yz1 2GAQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h36si17347017plb.199.2019.05.28.01.07.24; Tue, 28 May 2019 01:07:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727386AbfE1IFu (ORCPT + 99 others); Tue, 28 May 2019 04:05:50 -0400 Received: from lb2-smtp-cloud9.xs4all.net ([194.109.24.26]:59121 "EHLO lb2-smtp-cloud9.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726305AbfE1IFu (ORCPT ); Tue, 28 May 2019 04:05:50 -0400 Received: from [IPv6:2001:983:e9a7:1:10b2:2e62:e4b1:bd13] ([IPv6:2001:983:e9a7:1:10b2:2e62:e4b1:bd13]) by smtp-cloud9.xs4all.net with ESMTPA id VX7Dhgcf2sDWyVX7Ehc36i; Tue, 28 May 2019 10:05:48 +0200 Subject: Re: [PATCH v7 1/3] media: cec: expose HDMI connector to CEC dev mapping To: Dariusz Marcinkiewicz Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org References: <20190521105203.154043-1-darekm@google.com> <16889839-b4e9-9984-2e36-5f07ceb7d7f2@xs4all.nl> From: Hans Verkuil Message-ID: <8e575d0b-4765-ae54-019e-0fab522fe1d5@xs4all.nl> Date: Tue, 28 May 2019 10:05:47 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfI0zvfm6RKxnUHwaDkefRQt5vwHDdDDmoCixtWbm0IBhnZfpUCNXMA/QPOHKUnNfBG3JPyE/VCOe722VEDiFBEEXIZ6Tgb+vDqJs/J4tYtu+04oASdlw +ftguDsGm49XsUWVyyhcoYf3TFKARSYRiNbQKfK0mNVlekk+DQyCYnSnDLVqaU3cXg/16wHpcDRPz53Mvt6Dp0/iEx5YaK36EyvfFyyjRjFf3gpZxuPLKHOT k2vzUlFDjeBrhOhjUZKsHRRtJJU2+g+EBpKtaHMiozRfq5StoHXGFnSs8NwefHUKq1QHI7RkoiUVNVcbADq9vE6m6Get+QBOP+3ELcA0CZkuwSZLULhcE/uN 8tkVGtMo Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/28/19 9:53 AM, Dariusz Marcinkiewicz wrote: > On Fri, May 24, 2019 at 11:21 AM Hans Verkuil wrote: >> >> Hi Dariusz, >> >> I did some more testing with the Khadas VIM2 and found another problem, >> something that will, unfortunately, require some redesign. >> > ... >> >> The other problem is in the CEC driver: it creates the CEC device as >> soon as the HDMI device is found (cec_notifier_parse_hdmi_phandle). >> >> But that doesn't mean that the HDMI device also had registered itself >> as a CEC notifier. >> >> Until now that never mattered: as long as the HDMI device was found >> the CEC adapter would function fine, it would just have no physical >> address until so notified by the HDMI device once it registered its >> CEC notifier. >> >> But if we want to have valid connector info during the lifetime of >> the CEC adapter, then this no longer works. >> >> I'm not entirely sure how to handle this. >> >> Another issue here is that when the HDMI driver removes the notifier, >> then it should also zero the connector info. Remember that both the >> HDMI and the CEC drivers can be loaded and unloaded independently from >> one another. >> > Given all of the above, what do you think about coming back to the v1 > of the patch, where a connector info could be set on an adapter at any > time and an event was used to notify userland when that happened? That > approach seems to cover all the scenarios mentioned above. That's just hiding the real problems :-) I hope to spend some time on CEC tomorrow and I'll get back to you then. Regards, Hans