Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4704266ybi; Tue, 28 May 2019 00:55:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqyaeM23h+dvdkqVlhiWnZBSRQY44g2hN7gIs6WhLLwrgNUGAtt9M1mfMi89z7/H7Rtlt4Ib X-Received: by 2002:a63:eb01:: with SMTP id t1mr46239299pgh.385.1559030125258; Tue, 28 May 2019 00:55:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559030125; cv=none; d=google.com; s=arc-20160816; b=IDXOjEwm8RWkVbtyV2sz3mcbzfc2EN568wI/SuCFTs1Uv8Md2SzdsxfHoFoaVB0AOM mjkSTXNb4QZXNbSB/rldZcuQ7t/hCrrV82eEaHTET2QrCUD3qYLp7+Kl3dVqxknASuRj 4GKBpl1IsOdHFSKi0HbNXzGCJwZf3FFLBqQtKwArC5Bt6Xlg0p9gSgsiq63204UogLSI rji2O6SNpmULifweWw2ghNdpxwUVywXVGo119eTJwYWSEEcT0ki3DBUj+vRt6xuGOMui ntLrLykkBzkqvHNJEZnMkGvHFtT+dz+1X9iXDdwkLYq1G03rjwSxKoZxAdxUfq4Yk8Ph 7tVQ== 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=PwpZM8H7YLCCXst1uTeA0ehiQjYxPanrQx8rycjOA8Q=; b=K96kLuG+mwuwkbVBzq4fTGmwf+jFaV2SkTvOAg32aFrssPr+jW6SR6YhwmA0uPmaQo uEbdzF8iFRXl3on9jLaPRzY3WgM1NL2xwRbrzABIq0mpr97ipcjYZREsrQ7CL9KjGL+0 l0GW4K8PnN7bOx0FJrTEwslNHr9yK5kY8tOLf1GR47cvH+xlGqYXWViNAN20jn0gErww 08VZGQL2i8vfUFJjUZ0UYXzY+qcvmMRUwYjx/WeUz3adGJhMnCOEH8DXtzJVc/q1Ogfh 2RjMri3kfgX9Qs4UbKCJdI9MCJ++p16xzj7Ofk1xkT5RWszM4rrbC2gW9awdXDddGIRG hXTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=PaDGUarq; 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 bc7si20418116plb.108.2019.05.28.00.55.09; Tue, 28 May 2019 00:55:25 -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=PaDGUarq; 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 S1727653AbfE1Hxh (ORCPT + 99 others); Tue, 28 May 2019 03:53:37 -0400 Received: from mail-it1-f193.google.com ([209.85.166.193]:52881 "EHLO mail-it1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727039AbfE1Hxf (ORCPT ); Tue, 28 May 2019 03:53:35 -0400 Received: by mail-it1-f193.google.com with SMTP id t184so2767560itf.2 for ; Tue, 28 May 2019 00:53:35 -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=PwpZM8H7YLCCXst1uTeA0ehiQjYxPanrQx8rycjOA8Q=; b=PaDGUarqrwpn2WcZZXubIFwn/6XV9UCbOFvCg6kTbDsTzqCLbHOOZ7QtA06c8hxWTV vP8X9KiDQuqkX+tx7S57VyKMl/UK4cHRxZMJWdx33DW2ImQsx2YVeFYbnbEMODSZfaZW cYTIhj5G5/ydQa71BrGhnw5rQHltAXiD3tX1ZDbrHd6eFJn+oDnwZ+ranKYrTHKbhAcz w/x8Cc4gS2RkQh+i2xStLMXPa9FyrgscAalR1ecTPhTwm1kUMAETKylg0DPBDWLIq376 0M7m/jtHooSIK41pslNmsCzUETVmsCXJ8kEn5GTx1DhynYTeIKSdSj5E/UjUEnurRoZe geqQ== 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=PwpZM8H7YLCCXst1uTeA0ehiQjYxPanrQx8rycjOA8Q=; b=flejNce1f+hpDGZDTzag/TmNKt+ZK3FxawTg71bJX0zDCAry9JeYu5ocmdSVwc5/Fz K1wppN671nQgH5o3LSW9ctNDPs/mPw0Rsar+motjbf/f5lExaIRjlY9ZiA1v9vQ6dUTz u4FPWnuuSn+Fw8vYpS99PnVc3tuc4G52PC4tvU7kx3t6euc8qLZ7rPQOwd/FWda5Mlwm jjFM3+Q/gMM/M3BJQQ6lsTkycnaqKEfmApr1Kb0/IgOeKRSzq96GbRIl/wSGAtypJvJh o93dtdCYjTiUcLjaDHerE0ulbMhv+wEKM93cBPGdlzz4tgixhLC1cyH1weuTvA7sk6dP 5lcA== X-Gm-Message-State: APjAAAWmL3+zjw7fqI8n4xB7dQSUFFlFbsCGvX7iHSJQTMMe4kFqQDJX Bs6fmqwR1rCGEr/IYRh8Ac8zGYTmOlZq9zZyufrOXw== X-Received: by 2002:a24:3cb:: with SMTP id e194mr1991692ite.132.1559030014542; Tue, 28 May 2019 00:53:34 -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: Tue, 28 May 2019 09:53:23 +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 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. Thank you for testing the patches! Best regards.