Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp573041ybi; Wed, 19 Jun 2019 04:27:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqx4E47juNfFa7MszlpQg9VVQLVGKmhT/3QwjnXO98yr63Crc/yanbve6d34UG1coTsLQVVm X-Received: by 2002:a17:902:e40f:: with SMTP id ci15mr40751915plb.103.1560943657600; Wed, 19 Jun 2019 04:27:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560943657; cv=none; d=google.com; s=arc-20160816; b=sCLUaD768yR709Ut3gDGD0mrBsJovlOCk30zBQuoEBsRRk3T3n/dd5R0BDV1/26qwN B3KtH9aw7HeFKn4hr4nmAdlPazlVeFiVn7vfakoYBzAuoPuVJhCslKoG0yVy2bHdfnDC b7whul563NWL4wPvBK/MwaqEXfhS8sLLesBDBd/CT0Mkd8iFIcqv47aLntbhcWfLzNOj D+R8L8xs9qDiOn2nr/AThTwk3jpmwsdoFEY86xRh4sXfdDHzdFslOw9ZJcWhy9vb/v+k b+v30EgasqSpx2S+iqnl4hTkjbSJ6P+Xue6u4rXQtSCHuYJO2Tn+bQFcUNjV9+D7YXb1 7hvA== 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=Ofy0f347X05WrTQr32isstWTLw1ZVJhj6XoEta2Pa70=; b=VTRttIyt7P8EgOs5142aLotM2UfDbguLpEcxBThDuj+6Oax9AYg0YazspWWEFTv74E 1Yd0qw8LFj1Z9oqH1zrVl8pObFgA2dEZNqMICTiyNoQcnxferxdUQOoLt+Cfwz4MhZYl 8aEnewR6dd6achDc6qJ9ij2p5IeUEBYoEFPb4IBVCIr97khAAxew4PvWmx0pmZpQgsZ3 u40HwHWJ9emn49QTh2MJLeubBGReFeTx3RnM/yQw0YFDMV7KLT0Ifx/dkzaKpT76ph3R nTwy0Kjc3cpqj7kzEk7dWujaq098FGhBYZNx4exlsN/kkgRGJ4dh9XP0uYTvaJuL84Wa xktw== 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 k27si323190pgl.417.2019.06.19.04.27.22; Wed, 19 Jun 2019 04:27:37 -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 S1731632AbfFSL1A (ORCPT + 99 others); Wed, 19 Jun 2019 07:27:00 -0400 Received: from lb3-smtp-cloud9.xs4all.net ([194.109.24.30]:41491 "EHLO lb3-smtp-cloud9.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727076AbfFSL1A (ORCPT ); Wed, 19 Jun 2019 07:27:00 -0400 Received: from [IPv6:2001:983:e9a7:1:bdf4:9145:f694:e7a2] ([IPv6:2001:983:e9a7:1:bdf4:9145:f694:e7a2]) by smtp-cloud9.xs4all.net with ESMTPA id dYjvh2hHlbiAgdYjyheMFA; Wed, 19 Jun 2019 13:26:58 +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: <4566a4db-86db-c9ee-3a5b-9e7c605a6da7@xs4all.nl> Date: Wed, 19 Jun 2019 13:26:55 +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: MS4wfLkiYeyCJf1TKqZF4vspGS3CifNDj+TT6iXem0j8+Co+mmDALh0Wo01sebLcyd43TWXrpMQ8KqYsK4W0nZqoF8Cv0OMoxSk+q1Hn4fhLlBS5MVLewuWY QB/MZenDXYHRZJpMrkusiXYOwTmMhe6O3LXfgosMTjasx9oduewuM6Su1khYV4fsdTFhmhEbAX28s7qpHwPMXcptwnE1HZ4HsBTtnjmNRjexCJvtBmJQB0xH 1/ANUcQOk84J67DjTCeksJp4xkXCEqrBmhstueB6oNB/EZSbo9mBvOk8JcI6eWJMb6Nogl2RqGLkP+m/GoRR1gonnpuvY/i2Y7oLogfHfs5yxcGs61gl3C8y BCmN7pko Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/19/19 1:05 PM, Dariusz Marcinkiewicz wrote: > Hi Hans. > > I would like to come back to this thread. > > 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. >> >> See my comments below... >> > ... >> >> 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. >> > > I took a peek at the changes in > https://git.linuxtv.org/hverkuil/media_tree.git/log/?h=cec-conn. Do I > understand it correctly, that the above problem is addressed there by > unregistering an adapter in cec_notifier_conn_unregister (which will > result in /dev/cecX node going away)? I wonder to what degree this > solves the problem of HDMI and CEC drivers being loaded and unloaded > independently. It seems that in cases where HDMI driver is unloaded > and then loaded again, counterintuitively, the /dev/cecX might not > come back again, is this right, or am I missing something? Also, is it > guaranteed that adapter drivers won't try to access an adapter once it > gets removed by cec_notifier_conn_unregister? It's old code, I'm going to do it differently (closer to your version, actually). I just pushed my latest code, I'm much happier with it. I'll try to post a patch series this week. Regards, Hans