Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp551155ybi; Wed, 19 Jun 2019 04:06:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqzm5+B8Z7UgVMX7FRXRdv4u6Ay37ZaLHV99lUUaZrPOhIfVIBIv4eDIVz22ucKoi5iUH+Ap X-Received: by 2002:a63:1651:: with SMTP id 17mr7102863pgw.243.1560942360746; Wed, 19 Jun 2019 04:06:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560942360; cv=none; d=google.com; s=arc-20160816; b=b/Fq7945lDaiCBSRpzB3zmD7jsg/d7tffDlmO1xcw3Ve7IoZahk7HZFDnNueEdbqTG 8IcI7j6ZU+M7cZKt800Fhb47YXD8jaRfTaUE7Ggx+0Ox3cWgOBI8zJ/pysMXUCKf8aE2 ld2wDMdIAQ09gjWWXX/K5z9AA59Azzjtxtwd6G3cfvr2Ya1MtsmMWNHlDwEIZRhHtZh9 nQl/cI1Ik1VgiNYQKO1hECEsOW6MsjIajF2jTgadwhjAk8tUDCs3JCmc/5G8L22pDGdO ZOQjmpgtjquBKo4K4DgpR+2ZsgwPyj+sZgmsuKRe0U0Fm0dwK9NimgUrXJnUkf7ycGAD XVhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=rCYlhd274MLja1aUjw9jbduFZsTE4iqm0XJqesczC2M=; b=L9cqYleS5SaG/5uhy8ItszmLp5z2AWhRGpZNWPchdgAmvs1ppdLPgD34vk9hVub0Wi 4uBEpeDOvU3fkEL3eGIvLaFBaleBM122tYgfYTZgk+jsLxVMcxigN7Qqe3ioPvbu510A 4+EBgWyih8P/47zG5VSc18/f/kKxrnZbuVtpxIu97WfuIVoMeNmWX/2dSXnS44dIb0i6 55nZfjQ3YZVSa88JCadzvvXGTPWJTB0l7we8pWhUD4h9oQZ8Xvh5dc31uY9NnYpYJe7r Hkx7Vmp3GuW+OwrLDt8CqsadpaHemoE7fN7PrnQBXckTZjxhHhL4xmeJKp9B+C8rEWYq GilA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=uRIbyl+L; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d2si1210181pjs.10.2019.06.19.04.05.43; Wed, 19 Jun 2019 04:06:00 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=uRIbyl+L; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731507AbfFSLFY (ORCPT + 99 others); Wed, 19 Jun 2019 07:05:24 -0400 Received: from mail-io1-f67.google.com ([209.85.166.67]:38422 "EHLO mail-io1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731267AbfFSLFY (ORCPT ); Wed, 19 Jun 2019 07:05:24 -0400 Received: by mail-io1-f67.google.com with SMTP id j6so7517608ioa.5 for ; Wed, 19 Jun 2019 04:05:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=rCYlhd274MLja1aUjw9jbduFZsTE4iqm0XJqesczC2M=; b=uRIbyl+LBSLzrLgEFoRCXr89GPeHdisG96TJxaKDMULVeZsHUdogijixV+ND5zVaqX MJVl5pKFkSpIUFYawtVhoagKOYReGf58P5kKHrWQB0sNmS75c+iKdm4YsGisvFLz+gHi nOCGvdxlTADF7UIkLMfSOq1pRDe3YHqR1DbU08nx95eTqBsM0Dg4nVtiPpFGWkOZ0O7e KC/7kyd5JLcj/Dne4UaPNNjtzozxEhqgDc1TfSVWzrV2TpsRBOmjqu0s+l993ORMyK5R ifgZk01ODPnZjlQNqYJdVMFeQEn+P9cbmGapOLUoWemFJ7MAB2ZyRycuZg8/D5tbsSXE +WUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rCYlhd274MLja1aUjw9jbduFZsTE4iqm0XJqesczC2M=; b=V156o9C0PC3EXayi4DE9UJ9unaXrg7qxEH/KdZAlV0sH1f8bHclO+WHHcw3B0JxUtP FYNb3YJQGXpK2aG0ql0r8n0QJMVdLkKnXkySrMPgqnYnf7Hkft5pKcbc8uDi9klbB08T 8p5A015BZUHOeBk+SMlJE6DIWH7jZySge7GuLbBqr8hOg4wVe2Q4vYKGwt0A0D694maf WLVsmQGC3CCxHS0+17GQZJCjv2H2e4nnCduH4hOb3zZtD8638UNMw0FMrJZrV+1J4x8l /j8AfJKtWRHUCZ3j77wZi7fhULey3GraPiBqkCI24TL3zIG9+qbyomOkQ6kQmYND6z3V Qu5Q== X-Gm-Message-State: APjAAAVPQJMZ7xnkxhBgp3ix0MsYw575qbx6X63lbyYt3u2WqJu1w1zn +lejBqCdcg7Ke3OUfgrwYdLYnyYMpkG3RWeGyaNAFg== X-Received: by 2002:a5d:8845:: with SMTP id t5mr6046407ios.37.1560942323320; Wed, 19 Jun 2019 04:05:23 -0700 (PDT) MIME-Version: 1.0 References: <20190521105203.154043-1-darekm@google.com> <16889839-b4e9-9984-2e36-5f07ceb7d7f2@xs4all.nl> In-Reply-To: <16889839-b4e9-9984-2e36-5f07ceb7d7f2@xs4all.nl> From: Dariusz Marcinkiewicz Date: Wed, 19 Jun 2019 13:05:11 +0200 Message-ID: Subject: Re: [PATCH v7 1/3] media: cec: expose HDMI connector to CEC dev mapping To: Hans Verkuil Cc: linux-media@vger.kernel.org, hans.verkuil@cisco.com, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? Thank you.