From mboxrd@z Thu Jan 1 00:00:00 1970 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=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham 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 10B29C28CC0 for ; Wed, 29 May 2019 14:47:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E102422293 for ; Wed, 29 May 2019 14:47:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726544AbfE2Orp (ORCPT ); Wed, 29 May 2019 10:47:45 -0400 Received: from lb1-smtp-cloud9.xs4all.net ([194.109.24.22]:58203 "EHLO lb1-smtp-cloud9.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726106AbfE2Orp (ORCPT ); Wed, 29 May 2019 10:47:45 -0400 Received: from [IPv6:2001:983:e9a7:1:c843:3d28:cba4:8b6e] ([IPv6:2001:983:e9a7:1:c843:3d28:cba4:8b6e]) by smtp-cloud9.xs4all.net with ESMTPA id VzrihqjyRsDWyVzrjhhsMi; Wed, 29 May 2019 16:47:43 +0200 Subject: Re: [PATCH v7 1/3] media: cec: expose HDMI connector to CEC dev mapping From: Hans Verkuil 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> <8e575d0b-4765-ae54-019e-0fab522fe1d5@xs4all.nl> Message-ID: Date: Wed, 29 May 2019 16:47:42 +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: <8e575d0b-4765-ae54-019e-0fab522fe1d5@xs4all.nl> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfOFT+KbQpijqyY5R6EctfAmZFUWcR7Yo8VtDvKyY1iseCfmQislEu119ZXE7vyKuwoWGVlrk+vRYss4UV7TI8lpabv6A4Ezf/SBF9CeiZfUq0sePM05e klvYpdsrUkSKH2hKRVUZ1ZAeP0aAob/B/vnp76BTChU1VyxDtyuYsYr0o9Hdy+U7dgTuyiYF3rHTAH9oYrUS9Q2nMMMUWBlGV9iCOaC8uSe99TNO1rPcszYo Nzu1hK4y16hkHF8msZQxpkL5JfsrZGydglixkKiYet2TKPe7rYJu6upOAlaXYloccL2jEDt0MakXY9bc2OZ72gj8JjsGUCWl+NNQJAzeUXqpoT9MgPQoYjnt tHyGHbib Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/28/19 10:05 AM, Hans Verkuil wrote: > 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. Unfortunately I had too many other things going on to spend time on this. Hopefully next week. Regards, Hans