[{"id":1786825,"web_url":"http://patchwork.ozlabs.org/comment/1786825/","msgid":"<9314614a-446d-b76d-640b-033cc74e3879@xs4all.nl>","list_archive_url":null,"date":"2017-10-14T12:08:31","subject":"Re: [PATCHv4 0/4] tegra-cec: add Tegra HDMI CEC support","submitter":{"id":723,"url":"http://patchwork.ozlabs.org/api/people/723/","name":"Hans Verkuil","email":"hverkuil@xs4all.nl"},"content":"Hi Thierry,\n\nOn 09/11/2017 02:29 PM, Hans Verkuil wrote:\n> From: Hans Verkuil <hans.verkuil@cisco.com>\n> \n> This patch series adds support for the Tegra CEC functionality.\n> \n> This v4 has been rebased to the latest 4.14 pre-rc1 mainline.\n> \n> Please review! Other than for the bindings that are now Acked I have not\n> received any feedback.\n\nCan you or someone else from the Tegra maintainers review this?\n\nI have not heard anything about this patch series, nor of the previous\nversions of this series. What's the hold-up?\n\nRegards,\n\n\tHans\n\n> \n> The first patch documents the CEC bindings, the second adds support\n> for this to tegra124.dtsi and enables it for the Jetson TK1.\n> \n> The third patch adds the CEC driver itself and the final patch adds\n> the cec notifier support to the drm/tegra driver in order to notify\n> the CEC driver whenever the physical address changes.\n> \n> I expect that the dts changes apply as well to the Tegra X1/X2 and possibly\n> other Tegra SoCs, but I can only test this with my Jetson TK1 board.\n> \n> The dt-bindings and the tegra-cec driver would go in through the media\n> subsystem, the drm/tegra part through the drm subsystem and the dts\n> changes through (I guess) the linux-tegra developers. Luckily they are\n> all independent of one another.\n> \n> To test this you need the CEC utilities from git://linuxtv.org/v4l-utils.git.\n> \n> To build this:\n> \n> git clone git://linuxtv.org/v4l-utils.git\n> cd v4l-utils\n> ./bootstrap.sh; ./configure\n> make\n> sudo make install # optional, you really only need utils/cec*\n> \n> To test:\n> \n> cec-ctl --playback # configure as playback device\n> cec-ctl -S # detect all connected CEC devices\n> \n> See here for the public CEC API:\n> \n> https://hverkuil.home.xs4all.nl/spec/uapi/cec/cec-api.html\n> \n> Regards,\n> \n> \tHans\n> \n> Changes since v3:\n> \n> - Use the new CEC_CAP_DEFAULTS define\n> - Use IS_ERR(cec->adap) instead of IS_ERR_OR_NULL(cec->adap)\n>   (cec_allocate_adapter never returns a NULL pointer)\n> - Drop the device_init_wakeup: wakeup is not (yet) supported by\n>   the CEC framework and I have never tested it.\n> \n> Hans Verkuil (4):\n>   dt-bindings: document the tegra CEC bindings\n>   ARM: tegra: add CEC support to tegra124.dtsi\n>   tegra-cec: add Tegra HDMI CEC driver\n>   drm/tegra: add cec-notifier support\n> \n>  .../devicetree/bindings/media/tegra-cec.txt        |  27 ++\n>  MAINTAINERS                                        |   8 +\n>  arch/arm/boot/dts/tegra124-jetson-tk1.dts          |   4 +\n>  arch/arm/boot/dts/tegra124.dtsi                    |  12 +-\n>  drivers/gpu/drm/tegra/Kconfig                      |   1 +\n>  drivers/gpu/drm/tegra/drm.h                        |   3 +\n>  drivers/gpu/drm/tegra/hdmi.c                       |   9 +\n>  drivers/gpu/drm/tegra/output.c                     |   6 +\n>  drivers/media/platform/Kconfig                     |  11 +\n>  drivers/media/platform/Makefile                    |   2 +\n>  drivers/media/platform/tegra-cec/Makefile          |   1 +\n>  drivers/media/platform/tegra-cec/tegra_cec.c       | 501 +++++++++++++++++++++\n>  drivers/media/platform/tegra-cec/tegra_cec.h       | 127 ++++++\n>  13 files changed, 711 insertions(+), 1 deletion(-)\n>  create mode 100644 Documentation/devicetree/bindings/media/tegra-cec.txt\n>  create mode 100644 drivers/media/platform/tegra-cec/Makefile\n>  create mode 100644 drivers/media/platform/tegra-cec/tegra_cec.c\n>  create mode 100644 drivers/media/platform/tegra-cec/tegra_cec.h\n> \n\n--\nTo unsubscribe from this list: send the line \"unsubscribe devicetree\" in\nthe body of a message to majordomo@vger.kernel.org\nMore majordomo info at  http://vger.kernel.org/majordomo-info.html","headers":{"Return-Path":"<devicetree-owner@vger.kernel.org>","X-Original-To":"incoming-dt@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-dt@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=devicetree-owner@vger.kernel.org; receiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3yDjzW0lS6z9t3p\n\tfor <incoming-dt@patchwork.ozlabs.org>;\n\tSat, 14 Oct 2017 23:08:39 +1100 (AEDT)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1753523AbdJNMIh (ORCPT\n\t<rfc822;incoming-dt@patchwork.ozlabs.org>);\n\tSat, 14 Oct 2017 08:08:37 -0400","from lb3-smtp-cloud8.xs4all.net ([194.109.24.29]:46654 \"EHLO\n\tlb3-smtp-cloud8.xs4all.net\" rhost-flags-OK-OK-OK-OK)\n\tby vger.kernel.org with ESMTP id S1753513AbdJNMIg (ORCPT\n\t<rfc822; devicetree@vger.kernel.org>); Sat, 14 Oct 2017 08:08:36 -0400","from [192.168.2.10] ([212.251.195.8])\n\tby smtp-cloud8.xs4all.net with ESMTPA\n\tid 3LF1e1ARzg5cR3LF4eW2Vw; Sat, 14 Oct 2017 14:08:34 +0200"],"Subject":"Re: [PATCHv4 0/4] tegra-cec: add Tegra HDMI CEC support","From":"Hans Verkuil <hverkuil@xs4all.nl>","To":"linux-media@vger.kernel.org","Cc":"linux-tegra@vger.kernel.org, devicetree@vger.kernel.org,\n\tthierry.reding@gmail.com, dri-devel@lists.freedesktop.org","References":"<20170911122952.33980-1-hverkuil@xs4all.nl>","Message-ID":"<9314614a-446d-b76d-640b-033cc74e3879@xs4all.nl>","Date":"Sat, 14 Oct 2017 14:08:31 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<20170911122952.33980-1-hverkuil@xs4all.nl>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","X-CMAE-Envelope":"MS4wfJ/qcyigfUsUdOMVKBVLp9KqJXczcyMUJEguz8aSURTxksV9UnSfdcVDYRifTl8qaOPtmNREcXcWzwUnqxtGhHooA9nSoFxyTWgpmT+k0x9BuHqMXOTJ\n\tmcVikZ1f6V7R0hfLxwgz9FIhJfnjH4CBqDju9ZWE2RJWt51PX3YjQQGxSOqg6BxAQrhbm8pbSkTM1DGwjoYYNu33I+6mcyoBLa4VZOep2778CbjAF/M1F0m3\n\tuMfBogCS+fhZrTH8RGj0JM3pfvBX/VoJR25Jhb/8k1ZDkRXdwk1sezELyisiX13wdRY9F4T0yect3WXTn48qmS8TTiPca48MvQzV3NAxxvejyi6uZosizK4U\n\tQjIQp42G","Sender":"devicetree-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<devicetree.vger.kernel.org>","X-Mailing-List":"devicetree@vger.kernel.org"}},{"id":1786836,"web_url":"http://patchwork.ozlabs.org/comment/1786836/","msgid":"<20171014133410.GA13205@ulmo>","list_archive_url":null,"date":"2017-10-14T13:34:10","subject":"Re: [PATCHv4 0/4] tegra-cec: add Tegra HDMI CEC support","submitter":{"id":26234,"url":"http://patchwork.ozlabs.org/api/people/26234/","name":"Thierry Reding","email":"thierry.reding@gmail.com"},"content":"On Sat, Oct 14, 2017 at 02:08:31PM +0200, Hans Verkuil wrote:\n> Hi Thierry,\n> \n> On 09/11/2017 02:29 PM, Hans Verkuil wrote:\n> > From: Hans Verkuil <hans.verkuil@cisco.com>\n> > \n> > This patch series adds support for the Tegra CEC functionality.\n> > \n> > This v4 has been rebased to the latest 4.14 pre-rc1 mainline.\n> > \n> > Please review! Other than for the bindings that are now Acked I have not\n> > received any feedback.\n> \n> Can you or someone else from the Tegra maintainers review this?\n> \n> I have not heard anything about this patch series, nor of the previous\n> versions of this series. What's the hold-up?\n\nSorry about that. I've been meaning to look at this for a while now, but\nnever got around to it. From a quick glance this looks good. Let me take\nthis for a quick test-drive when I'm back at the office next week and\nI'll report back.\n\nIs there any particular ordering that we need to observe in order to\nmerge this? Looks to me like it would be safe to merge patches 1 and 3\nthrough the CEC (media?) tree and take the others through DRM and Tegra\nseparately without breaking anything.\n\nThierry\n\n> > The first patch documents the CEC bindings, the second adds support\n> > for this to tegra124.dtsi and enables it for the Jetson TK1.\n> > \n> > The third patch adds the CEC driver itself and the final patch adds\n> > the cec notifier support to the drm/tegra driver in order to notify\n> > the CEC driver whenever the physical address changes.\n> > \n> > I expect that the dts changes apply as well to the Tegra X1/X2 and possibly\n> > other Tegra SoCs, but I can only test this with my Jetson TK1 board.\n> > \n> > The dt-bindings and the tegra-cec driver would go in through the media\n> > subsystem, the drm/tegra part through the drm subsystem and the dts\n> > changes through (I guess) the linux-tegra developers. Luckily they are\n> > all independent of one another.\n> > \n> > To test this you need the CEC utilities from git://linuxtv.org/v4l-utils.git.\n> > \n> > To build this:\n> > \n> > git clone git://linuxtv.org/v4l-utils.git\n> > cd v4l-utils\n> > ./bootstrap.sh; ./configure\n> > make\n> > sudo make install # optional, you really only need utils/cec*\n> > \n> > To test:\n> > \n> > cec-ctl --playback # configure as playback device\n> > cec-ctl -S # detect all connected CEC devices\n> > \n> > See here for the public CEC API:\n> > \n> > https://hverkuil.home.xs4all.nl/spec/uapi/cec/cec-api.html\n> > \n> > Regards,\n> > \n> > \tHans\n> > \n> > Changes since v3:\n> > \n> > - Use the new CEC_CAP_DEFAULTS define\n> > - Use IS_ERR(cec->adap) instead of IS_ERR_OR_NULL(cec->adap)\n> >   (cec_allocate_adapter never returns a NULL pointer)\n> > - Drop the device_init_wakeup: wakeup is not (yet) supported by\n> >   the CEC framework and I have never tested it.\n> > \n> > Hans Verkuil (4):\n> >   dt-bindings: document the tegra CEC bindings\n> >   ARM: tegra: add CEC support to tegra124.dtsi\n> >   tegra-cec: add Tegra HDMI CEC driver\n> >   drm/tegra: add cec-notifier support\n> > \n> >  .../devicetree/bindings/media/tegra-cec.txt        |  27 ++\n> >  MAINTAINERS                                        |   8 +\n> >  arch/arm/boot/dts/tegra124-jetson-tk1.dts          |   4 +\n> >  arch/arm/boot/dts/tegra124.dtsi                    |  12 +-\n> >  drivers/gpu/drm/tegra/Kconfig                      |   1 +\n> >  drivers/gpu/drm/tegra/drm.h                        |   3 +\n> >  drivers/gpu/drm/tegra/hdmi.c                       |   9 +\n> >  drivers/gpu/drm/tegra/output.c                     |   6 +\n> >  drivers/media/platform/Kconfig                     |  11 +\n> >  drivers/media/platform/Makefile                    |   2 +\n> >  drivers/media/platform/tegra-cec/Makefile          |   1 +\n> >  drivers/media/platform/tegra-cec/tegra_cec.c       | 501 +++++++++++++++++++++\n> >  drivers/media/platform/tegra-cec/tegra_cec.h       | 127 ++++++\n> >  13 files changed, 711 insertions(+), 1 deletion(-)\n> >  create mode 100644 Documentation/devicetree/bindings/media/tegra-cec.txt\n> >  create mode 100644 drivers/media/platform/tegra-cec/Makefile\n> >  create mode 100644 drivers/media/platform/tegra-cec/tegra_cec.c\n> >  create mode 100644 drivers/media/platform/tegra-cec/tegra_cec.h\n> > \n>","headers":{"Return-Path":"<devicetree-owner@vger.kernel.org>","X-Original-To":"incoming-dt@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-dt@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=devicetree-owner@vger.kernel.org; receiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"MgLUjt3/\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3yDltL0Dm7z9t3Z\n\tfor <incoming-dt@patchwork.ozlabs.org>;\n\tSun, 15 Oct 2017 00:34:18 +1100 (AEDT)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1753743AbdJNNeP (ORCPT\n\t<rfc822;incoming-dt@patchwork.ozlabs.org>);\n\tSat, 14 Oct 2017 09:34:15 -0400","from mail-qk0-f193.google.com ([209.85.220.193]:48332 \"EHLO\n\tmail-qk0-f193.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1753741AbdJNNeO (ORCPT\n\t<rfc822; devicetree@vger.kernel.org>); Sat, 14 Oct 2017 09:34:14 -0400","by mail-qk0-f193.google.com with SMTP id d67so8057467qkg.5;\n\tSat, 14 Oct 2017 06:34:13 -0700 (PDT)","from localhost\n\t(p200300E41BE4FD00CEAD5B94E1CFD280.dip0.t-ipconnect.de.\n\t[2003:e4:1be4:fd00:cead:5b94:e1cf:d280])\n\tby smtp.gmail.com with ESMTPSA id\n\tn20sm1931617qka.1.2017.10.14.06.34.12\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tSat, 14 Oct 2017 06:34:12 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:in-reply-to:user-agent;\n\tbh=yYVKi7hlJUvYlPn3C7fgutivyxGTZpPv+qz2ua+Z/ZM=;\n\tb=MgLUjt3/lkMNndzL4TE9kr7lCh5VzxejkCxRYlN2KrvbjOzny7e5w8+MjAuESvfo7i\n\td9ivRdWeW+b0XHd/Gs8CD00JlU49tccVem8KsABA3UZtDV+JrYk21aloDwLS7cxZgvjG\n\tSUArbJYVFZ7++lkPhJh20OLvvavdPiLYyzf601O5K0AzXjuDjCG/3JBA6w8Ji5FUwFVd\n\tsfsOUo23lLaLA79Vz0g3aLHQr0CipTMUNtfz6D9uBI5kyeumHUJyzzvWfb4q3WBUGPRZ\n\t7OxiKY9H8ceKYjpppv3BsWwfh4CSyQjsuldv00gN9aIvhk0gXNNGEMSBXYWaA6uQC/OL\n\tgbnQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:in-reply-to:user-agent;\n\tbh=yYVKi7hlJUvYlPn3C7fgutivyxGTZpPv+qz2ua+Z/ZM=;\n\tb=jPQ7F+Oim7DhCwklzisHrqU6HtGVEvRpViEIRFSKYN5vcfAPXeYj+DtMg8lxEpRgzB\n\t2Sg2PEJ5En47bgo2ELB9R06j7dMgf3pRSNsto8g05Nh4Pg55DoiaJreHlUGUo0d05BIM\n\tRVxBKofKX8N8fGBcQ1DX9JPJ0Q+zvHc/GWd922tLEwLEXBc8gA7c+z1E68IgAdKWIPBd\n\tfl6apxemDnGY67CpMglw7oNxPwU1sYjDJfmmCl3dBEHaCeZadge5gFmPlmrt/imxtsdV\n\tvXWrru3LRBi01NgSNRKdm+0ejfpnUQgpG1M9r37HHFfES3uyA1VRhu/A9YoTdacArpho\n\tXCYg==","X-Gm-Message-State":"AMCzsaW43VVm/K4QbP6UfcdrfI9hiTXzBYtPKivhDBRkEbrj5Z0LFYMW\n\toigho9VaJkF8+BOdYOV67W2i0w==","X-Google-Smtp-Source":"ABhQp+QJtnA9O5sGXT+yyWeuF4FSOPhDs8P4une10zfULBAfcg0xvJtHrCHzYuvsFqWq1EHNSNNwMg==","X-Received":"by 10.55.212.154 with SMTP id s26mr1468696qks.200.1507988053088; \n\tSat, 14 Oct 2017 06:34:13 -0700 (PDT)","Date":"Sat, 14 Oct 2017 15:34:10 +0200","From":"Thierry Reding <thierry.reding@gmail.com>","To":"Hans Verkuil <hverkuil@xs4all.nl>","Cc":"linux-media@vger.kernel.org, linux-tegra@vger.kernel.org,\n\tdevicetree@vger.kernel.org, dri-devel@lists.freedesktop.org","Subject":"Re: [PATCHv4 0/4] tegra-cec: add Tegra HDMI CEC support","Message-ID":"<20171014133410.GA13205@ulmo>","References":"<20170911122952.33980-1-hverkuil@xs4all.nl>\n\t<9314614a-446d-b76d-640b-033cc74e3879@xs4all.nl>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\"; boundary=\"tKW2IUtsqtDRztdT\"","Content-Disposition":"inline","In-Reply-To":"<9314614a-446d-b76d-640b-033cc74e3879@xs4all.nl>","User-Agent":"Mutt/1.9.1 (2017-09-22)","Sender":"devicetree-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<devicetree.vger.kernel.org>","X-Mailing-List":"devicetree@vger.kernel.org"}},{"id":1786839,"web_url":"http://patchwork.ozlabs.org/comment/1786839/","msgid":"<f3c8aa19-fc13-63fc-724b-1200ce7ce090@xs4all.nl>","list_archive_url":null,"date":"2017-10-14T13:48:08","subject":"Re: [PATCHv4 0/4] tegra-cec: add Tegra HDMI CEC support","submitter":{"id":723,"url":"http://patchwork.ozlabs.org/api/people/723/","name":"Hans Verkuil","email":"hverkuil@xs4all.nl"},"content":"On 10/14/2017 03:34 PM, Thierry Reding wrote:\n> On Sat, Oct 14, 2017 at 02:08:31PM +0200, Hans Verkuil wrote:\n>> Hi Thierry,\n>>\n>> On 09/11/2017 02:29 PM, Hans Verkuil wrote:\n>>> From: Hans Verkuil <hans.verkuil@cisco.com>\n>>>\n>>> This patch series adds support for the Tegra CEC functionality.\n>>>\n>>> This v4 has been rebased to the latest 4.14 pre-rc1 mainline.\n>>>\n>>> Please review! Other than for the bindings that are now Acked I have not\n>>> received any feedback.\n>>\n>> Can you or someone else from the Tegra maintainers review this?\n>>\n>> I have not heard anything about this patch series, nor of the previous\n>> versions of this series. What's the hold-up?\n> \n> Sorry about that. I've been meaning to look at this for a while now, but\n> never got around to it. From a quick glance this looks good. Let me take\n> this for a quick test-drive when I'm back at the office next week and\n> I'll report back.\n\nIt would be great if you can test if the TK1 dts changes will also work\nwith the Jetson X1. It should, but I don't have a Jetson X1 to test with.\n\n> Is there any particular ordering that we need to observe in order to\n> merge this? Looks to me like it would be safe to merge patches 1 and 3\n> through the CEC (media?) tree and take the others through DRM and Tegra\n> separately without breaking anything.\n\nCorrect. Once I have your Ack I can make a pull request for patches 1+3.\nPatches 2+4 would have to go through you.\n\nRegards,\n\n\tHans\n\n> \n> Thierry\n> \n>>> The first patch documents the CEC bindings, the second adds support\n>>> for this to tegra124.dtsi and enables it for the Jetson TK1.\n>>>\n>>> The third patch adds the CEC driver itself and the final patch adds\n>>> the cec notifier support to the drm/tegra driver in order to notify\n>>> the CEC driver whenever the physical address changes.\n>>>\n>>> I expect that the dts changes apply as well to the Tegra X1/X2 and possibly\n>>> other Tegra SoCs, but I can only test this with my Jetson TK1 board.\n>>>\n>>> The dt-bindings and the tegra-cec driver would go in through the media\n>>> subsystem, the drm/tegra part through the drm subsystem and the dts\n>>> changes through (I guess) the linux-tegra developers. Luckily they are\n>>> all independent of one another.\n>>>\n>>> To test this you need the CEC utilities from git://linuxtv.org/v4l-utils.git.\n>>>\n>>> To build this:\n>>>\n>>> git clone git://linuxtv.org/v4l-utils.git\n>>> cd v4l-utils\n>>> ./bootstrap.sh; ./configure\n>>> make\n>>> sudo make install # optional, you really only need utils/cec*\n>>>\n>>> To test:\n>>>\n>>> cec-ctl --playback # configure as playback device\n>>> cec-ctl -S # detect all connected CEC devices\n>>>\n>>> See here for the public CEC API:\n>>>\n>>> https://hverkuil.home.xs4all.nl/spec/uapi/cec/cec-api.html\n>>>\n>>> Regards,\n>>>\n>>> \tHans\n>>>\n>>> Changes since v3:\n>>>\n>>> - Use the new CEC_CAP_DEFAULTS define\n>>> - Use IS_ERR(cec->adap) instead of IS_ERR_OR_NULL(cec->adap)\n>>>   (cec_allocate_adapter never returns a NULL pointer)\n>>> - Drop the device_init_wakeup: wakeup is not (yet) supported by\n>>>   the CEC framework and I have never tested it.\n>>>\n>>> Hans Verkuil (4):\n>>>   dt-bindings: document the tegra CEC bindings\n>>>   ARM: tegra: add CEC support to tegra124.dtsi\n>>>   tegra-cec: add Tegra HDMI CEC driver\n>>>   drm/tegra: add cec-notifier support\n>>>\n>>>  .../devicetree/bindings/media/tegra-cec.txt        |  27 ++\n>>>  MAINTAINERS                                        |   8 +\n>>>  arch/arm/boot/dts/tegra124-jetson-tk1.dts          |   4 +\n>>>  arch/arm/boot/dts/tegra124.dtsi                    |  12 +-\n>>>  drivers/gpu/drm/tegra/Kconfig                      |   1 +\n>>>  drivers/gpu/drm/tegra/drm.h                        |   3 +\n>>>  drivers/gpu/drm/tegra/hdmi.c                       |   9 +\n>>>  drivers/gpu/drm/tegra/output.c                     |   6 +\n>>>  drivers/media/platform/Kconfig                     |  11 +\n>>>  drivers/media/platform/Makefile                    |   2 +\n>>>  drivers/media/platform/tegra-cec/Makefile          |   1 +\n>>>  drivers/media/platform/tegra-cec/tegra_cec.c       | 501 +++++++++++++++++++++\n>>>  drivers/media/platform/tegra-cec/tegra_cec.h       | 127 ++++++\n>>>  13 files changed, 711 insertions(+), 1 deletion(-)\n>>>  create mode 100644 Documentation/devicetree/bindings/media/tegra-cec.txt\n>>>  create mode 100644 drivers/media/platform/tegra-cec/Makefile\n>>>  create mode 100644 drivers/media/platform/tegra-cec/tegra_cec.c\n>>>  create mode 100644 drivers/media/platform/tegra-cec/tegra_cec.h\n>>>\n>>\n\n--\nTo unsubscribe from this list: send the line \"unsubscribe devicetree\" in\nthe body of a message to majordomo@vger.kernel.org\nMore majordomo info at  http://vger.kernel.org/majordomo-info.html","headers":{"Return-Path":"<devicetree-owner@vger.kernel.org>","X-Original-To":"incoming-dt@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-dt@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=devicetree-owner@vger.kernel.org; receiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3yDmBR4bdhz9t3h\n\tfor <incoming-dt@patchwork.ozlabs.org>;\n\tSun, 15 Oct 2017 00:48:15 +1100 (AEDT)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1753198AbdJNNsN (ORCPT\n\t<rfc822;incoming-dt@patchwork.ozlabs.org>);\n\tSat, 14 Oct 2017 09:48:13 -0400","from lb2-smtp-cloud8.xs4all.net ([194.109.24.25]:59889 \"EHLO\n\tlb2-smtp-cloud8.xs4all.net\" rhost-flags-OK-OK-OK-OK)\n\tby vger.kernel.org with ESMTP id S1753026AbdJNNsN (ORCPT\n\t<rfc822; devicetree@vger.kernel.org>); Sat, 14 Oct 2017 09:48:13 -0400","from [192.168.2.10] ([212.251.195.8])\n\tby smtp-cloud8.xs4all.net with ESMTPA\n\tid 3MnQe1U7eg5cR3MnTeW8ya; Sat, 14 Oct 2017 15:48:11 +0200"],"Subject":"Re: [PATCHv4 0/4] tegra-cec: add Tegra HDMI CEC support","To":"Thierry Reding <thierry.reding@gmail.com>","Cc":"linux-media@vger.kernel.org, linux-tegra@vger.kernel.org,\n\tdevicetree@vger.kernel.org, dri-devel@lists.freedesktop.org","References":"<20170911122952.33980-1-hverkuil@xs4all.nl>\n\t<9314614a-446d-b76d-640b-033cc74e3879@xs4all.nl>\n\t<20171014133410.GA13205@ulmo>","From":"Hans Verkuil <hverkuil@xs4all.nl>","Message-ID":"<f3c8aa19-fc13-63fc-724b-1200ce7ce090@xs4all.nl>","Date":"Sat, 14 Oct 2017 15:48:08 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<20171014133410.GA13205@ulmo>","Content-Type":"text/plain; charset=windows-1252","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","X-CMAE-Envelope":"MS4wfISNnOsGfXucJJNLX7OFKIkAs5qPlqUn6VvgRwtmqT6oKBJv21yS/RFyoGqv1sY8rF4fEeDzdm5hQVX6AB0XxBPKyhF88aUNdEfKhB9llCSqDcu/2NHg\n\ttDM63BsmzFGWJxG7HZ0URPxMNM1LSsrff+JSNIeq7dY40tFOFfZ0WNKZENTBypDwd6it+x2bVxiQ7bs6y1LdqgipzAAfe1kQl8rnyzOk417bJvkDjzuAJqZk\n\t8qo7ClyHOh6sw3lHM17hw8v9NfaBnqgbgUV136pEvMgGFXeg8ktgMbKAKSNfmFUJFG6yvkpz9VFwB0XZhX8i6GE9pyBzIjUDCDTc+5JU4fw=","Sender":"devicetree-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<devicetree.vger.kernel.org>","X-Mailing-List":"devicetree@vger.kernel.org"}},{"id":1790287,"web_url":"http://patchwork.ozlabs.org/comment/1790287/","msgid":"<20171019092054.GC9005@ulmo>","list_archive_url":null,"date":"2017-10-19T09:20:54","subject":"Re: [PATCHv4 0/4] tegra-cec: add Tegra HDMI CEC support","submitter":{"id":26234,"url":"http://patchwork.ozlabs.org/api/people/26234/","name":"Thierry Reding","email":"thierry.reding@gmail.com"},"content":"On Mon, Sep 11, 2017 at 02:29:48PM +0200, Hans Verkuil wrote:\n> From: Hans Verkuil <hans.verkuil@cisco.com>\n> \n> This patch series adds support for the Tegra CEC functionality.\n> \n> This v4 has been rebased to the latest 4.14 pre-rc1 mainline.\n> \n> Please review! Other than for the bindings that are now Acked I have not\n> received any feedback.\n> \n> The first patch documents the CEC bindings, the second adds support\n> for this to tegra124.dtsi and enables it for the Jetson TK1.\n> \n> The third patch adds the CEC driver itself and the final patch adds\n> the cec notifier support to the drm/tegra driver in order to notify\n> the CEC driver whenever the physical address changes.\n> \n> I expect that the dts changes apply as well to the Tegra X1/X2 and possibly\n> other Tegra SoCs, but I can only test this with my Jetson TK1 board.\n> \n> The dt-bindings and the tegra-cec driver would go in through the media\n> subsystem, the drm/tegra part through the drm subsystem and the dts\n> changes through (I guess) the linux-tegra developers. Luckily they are\n> all independent of one another.\n> \n> To test this you need the CEC utilities from git://linuxtv.org/v4l-utils.git.\n> \n> To build this:\n> \n> git clone git://linuxtv.org/v4l-utils.git\n> cd v4l-utils\n> ./bootstrap.sh; ./configure\n> make\n> sudo make install # optional, you really only need utils/cec*\n> \n> To test:\n> \n> cec-ctl --playback # configure as playback device\n> cec-ctl -S # detect all connected CEC devices\n\nI finally got around to test this. Unfortunately I wasn't able to\nproperly show connected CEC devices, but I think that may just be\nbecause the monitor I was testing against doesn't support CEC. I\nwill have to check against a different device eventually to check\nthat it properly enumerates, though I suspect you've already done\nquite extensive testing yourself.\n\nThanks for doing this!\n\nThierry","headers":{"Return-Path":"<devicetree-owner@vger.kernel.org>","X-Original-To":"incoming-dt@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-dt@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=devicetree-owner@vger.kernel.org; receiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"QhmwgdS5\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3yHk1q3B3mz9t4P\n\tfor <incoming-dt@patchwork.ozlabs.org>;\n\tThu, 19 Oct 2017 20:21:03 +1100 (AEDT)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752203AbdJSJVA (ORCPT\n\t<rfc822;incoming-dt@patchwork.ozlabs.org>);\n\tThu, 19 Oct 2017 05:21:00 -0400","from mail-qk0-f196.google.com ([209.85.220.196]:47293 \"EHLO\n\tmail-qk0-f196.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751955AbdJSJU6 (ORCPT\n\t<rfc822; devicetree@vger.kernel.org>); Thu, 19 Oct 2017 05:20:58 -0400","by mail-qk0-f196.google.com with SMTP id m189so9517822qke.4;\n\tThu, 19 Oct 2017 02:20:57 -0700 (PDT)","from localhost\n\t(p200300E41BE4FD00CEAD5B94E1CFD280.dip0.t-ipconnect.de.\n\t[2003:e4:1be4:fd00:cead:5b94:e1cf:d280])\n\tby smtp.gmail.com with ESMTPSA id\n\tu32sm9344892qte.25.2017.10.19.02.20.55\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tThu, 19 Oct 2017 02:20:56 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:in-reply-to:user-agent;\n\tbh=8rdO3gi7nRnG3mfLM7yxuje1soCUI27wbhMdi+cHXZE=;\n\tb=QhmwgdS5i33tNIWh3wtnW/DEE0wOj+fD6NMtovY9REJBURMAmY0s+dpGBoJnZZ5AN0\n\tJTyT7R8k1razYV6YCHZV0Ajhh9puRzu18A7P5StibNL+C8n/L8YZ6GhXs8FcQ57fO5ew\n\tErRHfyegMfjBDf7VT1X62IPuGkbBN4KJkYAOXDqyv68slrnlgqmB2a6hKai3HMDvfj0s\n\tBGGfn3mOIM+qNhwQLe5kG8ZZ3ApGnoK36trLSLfe3oFGBj9yW5GoJhZzrT0WcvqO2yPi\n\t9Er4u7bO9/o2p1FIK7xIcegDrwBtkpBYlKLQcPX23xpBHt6BQFmysiTGNMIEHYJSrloq\n\t2hcg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:in-reply-to:user-agent;\n\tbh=8rdO3gi7nRnG3mfLM7yxuje1soCUI27wbhMdi+cHXZE=;\n\tb=XAzGGhDNGy/Hgjj55wPY83GOv293KIug4zO/Wp/R9kblOVcV0vdgfIw1TH7D3/WMJZ\n\t49ugaLt4TepypGcELMhq+OpxT/EVeoH+F/PDXcQABhF8fiST0xGl8dvsjP2JJWJDsrq7\n\tzS+keYUtyGFILZtpBNpqY6eTDk9f1+EHyhra6yPY6cKk1Buu2wbQj0Lb7V1iX1c7QEqO\n\tpbjpCMkrFRPecYxZzS3o4K3modMvBwE6lN76Db4P1pQcoaXGXcFtbi9X52Ll7qk+jZn5\n\tyT9dUio+VLFxiKOBkFjPa92p/LR2ceDMZmL1i7nv95ZC04Ba5fN/4I44YML7KWOzra2W\n\teBkw==","X-Gm-Message-State":"AMCzsaWybBG6WQl1Fo3l2RfHoZy8yDdNDFRenV9e6sYKPtAqvqnU+GbG\n\toZP77wQq/+RFNac4xCoUZ97bXA==","X-Google-Smtp-Source":"ABhQp+RLXE4rL4pO+uaT0ivAje3L6qmiC+0M02AyaaIkFZOI/pDxxF7oP7qya/zabx3gn4PvaPjw9w==","X-Received":"by 10.55.212.70 with SMTP id l67mr1078958qki.140.1508404857098; \n\tThu, 19 Oct 2017 02:20:57 -0700 (PDT)","Date":"Thu, 19 Oct 2017 11:20:54 +0200","From":"Thierry Reding <thierry.reding@gmail.com>","To":"Hans Verkuil <hverkuil@xs4all.nl>","Cc":"linux-media@vger.kernel.org, linux-tegra@vger.kernel.org,\n\tdevicetree@vger.kernel.org, dri-devel@lists.freedesktop.org","Subject":"Re: [PATCHv4 0/4] tegra-cec: add Tegra HDMI CEC support","Message-ID":"<20171019092054.GC9005@ulmo>","References":"<20170911122952.33980-1-hverkuil@xs4all.nl>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\"; boundary=\"p2kqVDKq5asng8Dg\"","Content-Disposition":"inline","In-Reply-To":"<20170911122952.33980-1-hverkuil@xs4all.nl>","User-Agent":"Mutt/1.9.1 (2017-09-22)","Sender":"devicetree-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<devicetree.vger.kernel.org>","X-Mailing-List":"devicetree@vger.kernel.org"}},{"id":1790291,"web_url":"http://patchwork.ozlabs.org/comment/1790291/","msgid":"<20171019092315.GE9005@ulmo>","list_archive_url":null,"date":"2017-10-19T09:23:15","subject":"Re: [PATCHv4 2/4] ARM: tegra: add CEC support to tegra124.dtsi","submitter":{"id":26234,"url":"http://patchwork.ozlabs.org/api/people/26234/","name":"Thierry Reding","email":"thierry.reding@gmail.com"},"content":"On Mon, Sep 11, 2017 at 02:29:50PM +0200, Hans Verkuil wrote:\n> From: Hans Verkuil <hans.verkuil@cisco.com>\n> \n> Add support for the Tegra CEC IP to tegra124.dtsi and enable it on the\n> Jetson TK1.\n> \n> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>\n> ---\n>  arch/arm/boot/dts/tegra124-jetson-tk1.dts |  4 ++++\n>  arch/arm/boot/dts/tegra124.dtsi           | 12 +++++++++++-\n>  2 files changed, 15 insertions(+), 1 deletion(-)\n\nI prefer SoC and board changes to be split into separate patches. I've\ndone that with this patch while applying.\n\nThanks,\nThierry","headers":{"Return-Path":"<devicetree-owner@vger.kernel.org>","X-Original-To":"incoming-dt@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-dt@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=devicetree-owner@vger.kernel.org; receiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"NH3JjL1C\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3yHk4Y2ksVz9t4P\n\tfor <incoming-dt@patchwork.ozlabs.org>;\n\tThu, 19 Oct 2017 20:23:25 +1100 (AEDT)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752571AbdJSJXW (ORCPT\n\t<rfc822;incoming-dt@patchwork.ozlabs.org>);\n\tThu, 19 Oct 2017 05:23:22 -0400","from mail-qt0-f194.google.com ([209.85.216.194]:47937 \"EHLO\n\tmail-qt0-f194.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751824AbdJSJXT (ORCPT\n\t<rfc822; devicetree@vger.kernel.org>); Thu, 19 Oct 2017 05:23:19 -0400","by mail-qt0-f194.google.com with SMTP id z50so13599417qtj.4;\n\tThu, 19 Oct 2017 02:23:18 -0700 (PDT)","from localhost\n\t(p200300E41BE4FD00CEAD5B94E1CFD280.dip0.t-ipconnect.de.\n\t[2003:e4:1be4:fd00:cead:5b94:e1cf:d280])\n\tby smtp.gmail.com with ESMTPSA id\n\tt18sm9331203qtc.58.2017.10.19.02.23.17\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tThu, 19 Oct 2017 02:23:17 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:in-reply-to:user-agent;\n\tbh=E49vo4kKPjXrWH0ae/iDVE3NlCIYJd/eseEHlWuM7/w=;\n\tb=NH3JjL1C1LQUQhB5v+XzeXhto0/iBBYoKy0N9eyUvd/GdSbaWotI0B1OH3XIQKxNOb\n\tu2RgyB9djyMZ6TEUoFATZjWspguzaC2KOkqgaj21CudcYhj+G1lOfDcpa+t09LgCt4iB\n\tC3eEcmpBebHzlYlC53st/tVNH/L0mURdMXffJTWxxZIWyyprxm8j2bFIqcMYG5s/FwQW\n\tLWM9quyntun0uvou2gK0gqqM4UnKnS1X0cH1MdsY24DtUrLWnB8Trg+ftOmp8r2IYg7e\n\t0aSk6LMqysB4KAuDNtku6hO0bm84ttzD7pnQH/p5rjzXcxusJ21F8fuITRGEyrGAUJRL\n\t0O0Q==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:in-reply-to:user-agent;\n\tbh=E49vo4kKPjXrWH0ae/iDVE3NlCIYJd/eseEHlWuM7/w=;\n\tb=qaqUu8UAv4vygPbN9bDfHhPZBRri32pMdqHjpMfgVKZc++Jlj8Ny+rh1Z/bM5TisFH\n\tyEQVrwZ+VCce7ciUt+UguCZNgpmcXzw5yd40m5umhzNhglGlfUpREuOks9ifsd/D4dzQ\n\tHfBZlQpbYTTt9pUPLC13/O2+RcU2/UXQgLnOX/qqHJPruCHS38YiQqvKGjojrLsTEMf/\n\tXwuKnhKTZ3QODdvxKLs6WKKezTJy9XOk0Ty4yAKZEyCONYKRxTVuHY+mWZFaDpfYc00j\n\tmffdowxb4b7mF4RrkB3Fq6Iv4tgaRHa/LjtnLQ409/ud/ISYY+pFnkO9B3w1ceaEASgL\n\t2hLA==","X-Gm-Message-State":"AMCzsaWjAM5LiOwMwf8c2MP/BuEjIdiUnr3S2mWD36jwUYyk4jNk4UXx\n\tDr2Nejo5TzbJMOe7+LX3gRQ=","X-Google-Smtp-Source":"ABhQp+T2HGZ6ATLK8/ZVQXOHl8yPOwwIBXzKHTtJs5I10Gh67fs+W4M02zdSuD6ARf7HCQRfZAZKpg==","X-Received":"by 10.200.12.193 with SMTP id o1mr1081912qti.254.1508404998335; \n\tThu, 19 Oct 2017 02:23:18 -0700 (PDT)","Date":"Thu, 19 Oct 2017 11:23:15 +0200","From":"Thierry Reding <thierry.reding@gmail.com>","To":"Hans Verkuil <hverkuil@xs4all.nl>","Cc":"linux-media@vger.kernel.org, linux-tegra@vger.kernel.org,\n\tdevicetree@vger.kernel.org, dri-devel@lists.freedesktop.org,\n\tHans Verkuil <hans.verkuil@cisco.com>","Subject":"Re: [PATCHv4 2/4] ARM: tegra: add CEC support to tegra124.dtsi","Message-ID":"<20171019092315.GE9005@ulmo>","References":"<20170911122952.33980-1-hverkuil@xs4all.nl>\n\t<20170911122952.33980-3-hverkuil@xs4all.nl>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\"; boundary=\"4Epv4kl9IRBfg3rk\"","Content-Disposition":"inline","In-Reply-To":"<20170911122952.33980-3-hverkuil@xs4all.nl>","User-Agent":"Mutt/1.9.1 (2017-09-22)","Sender":"devicetree-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<devicetree.vger.kernel.org>","X-Mailing-List":"devicetree@vger.kernel.org"}},{"id":1790299,"web_url":"http://patchwork.ozlabs.org/comment/1790299/","msgid":"<0f43276f-0a89-8caa-6522-253458e3ad08@xs4all.nl>","list_archive_url":null,"date":"2017-10-19T09:36:14","subject":"Re: [PATCHv4 0/4] tegra-cec: add Tegra HDMI CEC support","submitter":{"id":723,"url":"http://patchwork.ozlabs.org/api/people/723/","name":"Hans Verkuil","email":"hverkuil@xs4all.nl"},"content":"On 10/19/17 11:20, Thierry Reding wrote:\n> On Mon, Sep 11, 2017 at 02:29:48PM +0200, Hans Verkuil wrote:\n>> From: Hans Verkuil <hans.verkuil@cisco.com>\n>>\n>> This patch series adds support for the Tegra CEC functionality.\n>>\n>> This v4 has been rebased to the latest 4.14 pre-rc1 mainline.\n>>\n>> Please review! Other than for the bindings that are now Acked I have not\n>> received any feedback.\n>>\n>> The first patch documents the CEC bindings, the second adds support\n>> for this to tegra124.dtsi and enables it for the Jetson TK1.\n>>\n>> The third patch adds the CEC driver itself and the final patch adds\n>> the cec notifier support to the drm/tegra driver in order to notify\n>> the CEC driver whenever the physical address changes.\n>>\n>> I expect that the dts changes apply as well to the Tegra X1/X2 and possibly\n>> other Tegra SoCs, but I can only test this with my Jetson TK1 board.\n>>\n>> The dt-bindings and the tegra-cec driver would go in through the media\n>> subsystem, the drm/tegra part through the drm subsystem and the dts\n>> changes through (I guess) the linux-tegra developers. Luckily they are\n>> all independent of one another.\n>>\n>> To test this you need the CEC utilities from git://linuxtv.org/v4l-utils.git.\n>>\n>> To build this:\n>>\n>> git clone git://linuxtv.org/v4l-utils.git\n>> cd v4l-utils\n>> ./bootstrap.sh; ./configure\n>> make\n>> sudo make install # optional, you really only need utils/cec*\n>>\n>> To test:\n>>\n>> cec-ctl --playback # configure as playback device\n>> cec-ctl -S # detect all connected CEC devices\n> \n> I finally got around to test this. Unfortunately I wasn't able to\n> properly show connected CEC devices, but I think that may just be\n> because the monitor I was testing against doesn't support CEC. I\n> will have to check against a different device eventually to check\n> that it properly enumerates, though I suspect you've already done\n> quite extensive testing yourself.\n\nYes, you need a TV with CEC. Most (all?) PC monitors do not support this.\nI never understood why not.\n\nSo just to confirm: you've merged this driver for 4.15?\n\nRegards,\n\n\tHans\n--\nTo unsubscribe from this list: send the line \"unsubscribe devicetree\" in\nthe body of a message to majordomo@vger.kernel.org\nMore majordomo info at  http://vger.kernel.org/majordomo-info.html","headers":{"Return-Path":"<devicetree-owner@vger.kernel.org>","X-Original-To":"incoming-dt@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-dt@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=devicetree-owner@vger.kernel.org; receiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3yHkMY28fBz9t6K\n\tfor <incoming-dt@patchwork.ozlabs.org>;\n\tThu, 19 Oct 2017 20:36:25 +1100 (AEDT)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752237AbdJSJgW (ORCPT\n\t<rfc822;incoming-dt@patchwork.ozlabs.org>);\n\tThu, 19 Oct 2017 05:36:22 -0400","from lb3-smtp-cloud9.xs4all.net ([194.109.24.30]:35055 \"EHLO\n\tlb3-smtp-cloud9.xs4all.net\" rhost-flags-OK-OK-OK-OK)\n\tby vger.kernel.org with ESMTP id S1751609AbdJSJgV (ORCPT\n\t<rfc822; devicetree@vger.kernel.org>); Thu, 19 Oct 2017 05:36:21 -0400","from [IPv6:2001:420:44c1:2579:69aa:7125:e248:85d]\n\t([IPv6:2001:420:44c1:2579:69aa:7125:e248:85d])\n\tby smtp-cloud9.xs4all.net with ESMTPA\n\tid 57FPevJFFnIXb57FSeKxaq; Thu, 19 Oct 2017 11:36:19 +0200"],"Subject":"Re: [PATCHv4 0/4] tegra-cec: add Tegra HDMI CEC support","To":"Thierry Reding <thierry.reding@gmail.com>","Cc":"linux-media@vger.kernel.org, linux-tegra@vger.kernel.org,\n\tdevicetree@vger.kernel.org, dri-devel@lists.freedesktop.org","References":"<20170911122952.33980-1-hverkuil@xs4all.nl>\n\t<20171019092054.GC9005@ulmo>","From":"Hans Verkuil <hverkuil@xs4all.nl>","Message-ID":"<0f43276f-0a89-8caa-6522-253458e3ad08@xs4all.nl>","Date":"Thu, 19 Oct 2017 11:36:14 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<20171019092054.GC9005@ulmo>","Content-Type":"text/plain; charset=windows-1252","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","X-CMAE-Envelope":"MS4wfKVqasSrRLLIhwu5fPA4jcttC9whAd/R3X2IO0lJfrhQaD6pW2N2OIUzWPut6PWjoZfPNvpL+vwLsmcgtJUSH7omgGsQDOD8j0BtId5g/nKgbeP2ZaOV\n\ttGYvr9BXVXKiULdrUwVATvUryKZCcHEqNh4VoCDuNBOXPMiAoK28rS+Fr28clVmYuyX/HQdBRKQURv7yQZ2jKBDu2/ZbrXncFLP2JZCpaX03o7BVpkW2BZbu\n\tU8QrmRv2Rm8NW3ozId0Xb7ZjNsk6BI9CL0wPa+MGc2pYW6UPWyKzkfbobLeOEdNAml0QX7owmrPX1KTiqW+pcqxhiT2Nyq6Lnqo6DBM84X05/HJe/WSZU4zG\n\tiUIpiitMXABigxn0wSOJsWcmRAOueyYfWflWoDxvX7lZd6KcBV5o4rGxDLl8Z+eK8wxn4kBKCLc97x5vAciJdSPSUg4QKg==","Sender":"devicetree-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<devicetree.vger.kernel.org>","X-Mailing-List":"devicetree@vger.kernel.org"}},{"id":1790302,"web_url":"http://patchwork.ozlabs.org/comment/1790302/","msgid":"<20171019093700.GF9005@ulmo>","list_archive_url":null,"date":"2017-10-19T09:37:00","subject":"Re: [PATCHv4 3/4] tegra-cec: add Tegra HDMI CEC driver","submitter":{"id":26234,"url":"http://patchwork.ozlabs.org/api/people/26234/","name":"Thierry Reding","email":"thierry.reding@gmail.com"},"content":"On Mon, Sep 11, 2017 at 02:29:51PM +0200, Hans Verkuil wrote:\n[...]\n> diff --git a/drivers/media/platform/tegra-cec/tegra_cec.c b/drivers/media/platform/tegra-cec/tegra_cec.c\n[...]\n> +static int tegra_cec_probe(struct platform_device *pdev)\n> +{\n> +\tstruct platform_device *hdmi_dev;\n> +\tstruct device_node *np;\n> +\tstruct tegra_cec *cec;\n> +\tstruct resource *res;\n> +\tint ret = 0;\n> +\n> +\tnp = of_parse_phandle(pdev->dev.of_node, \"hdmi-phandle\", 0);\n> +\n> +\tif (!np) {\n> +\t\tdev_err(&pdev->dev, \"Failed to find hdmi node in device tree\\n\");\n> +\t\treturn -ENODEV;\n> +\t}\n> +\thdmi_dev = of_find_device_by_node(np);\n> +\tif (hdmi_dev == NULL)\n> +\t\treturn -EPROBE_DEFER;\n\nThis seems a little awkward. Why exactly do we need to defer probe here?\nIt seems to me like cec_notifier_get() should be able to deal with HDMI\nappearing at a later point.\n\n> +\n> +\tcec = devm_kzalloc(&pdev->dev, sizeof(struct tegra_cec), GFP_KERNEL);\n> +\n> +\tif (!cec)\n> +\t\treturn -ENOMEM;\n> +\n> +\tres = platform_get_resource(pdev, IORESOURCE_MEM, 0);\n> +\n> +\tif (!res) {\n> +\t\tdev_err(&pdev->dev,\n> +\t\t\t\"Unable to allocate resources for device\\n\");\n> +\t\tret = -EBUSY;\n> +\t\tgoto cec_error;\n> +\t}\n> +\n> +\tif (!devm_request_mem_region(&pdev->dev, res->start, resource_size(res),\n> +\t\tpdev->name)) {\n> +\t\tdev_err(&pdev->dev,\n> +\t\t\t\"Unable to request mem region for device\\n\");\n> +\t\tret = -EBUSY;\n> +\t\tgoto cec_error;\n> +\t}\n> +\n> +\tcec->tegra_cec_irq = platform_get_irq(pdev, 0);\n> +\n> +\tif (cec->tegra_cec_irq <= 0) {\n> +\t\tret = -EBUSY;\n> +\t\tgoto cec_error;\n> +\t}\n> +\n> +\tcec->cec_base = devm_ioremap_nocache(&pdev->dev, res->start,\n> +\t\tresource_size(res));\n> +\n> +\tif (!cec->cec_base) {\n> +\t\tdev_err(&pdev->dev, \"Unable to grab IOs for device\\n\");\n> +\t\tret = -EBUSY;\n> +\t\tgoto cec_error;\n> +\t}\n> +\n> +\tcec->clk = devm_clk_get(&pdev->dev, \"cec\");\n> +\n> +\tif (IS_ERR_OR_NULL(cec->clk)) {\n> +\t\tdev_err(&pdev->dev, \"Can't get clock for CEC\\n\");\n> +\t\tret = -ENOENT;\n> +\t\tgoto clk_error;\n> +\t}\n> +\n> +\tclk_prepare_enable(cec->clk);\n> +\n> +\t/* set context info. */\n> +\tcec->dev = &pdev->dev;\n> +\n> +\tplatform_set_drvdata(pdev, cec);\n> +\n> +\tret = devm_request_threaded_irq(&pdev->dev, cec->tegra_cec_irq,\n> +\t\ttegra_cec_irq_handler, tegra_cec_irq_thread_handler,\n> +\t\t0, \"cec_irq\", &pdev->dev);\n> +\n> +\tif (ret) {\n> +\t\tdev_err(&pdev->dev,\n> +\t\t\t\"Unable to request interrupt for device\\n\");\n> +\t\tgoto cec_error;\n> +\t}\n> +\n> +\tcec->notifier = cec_notifier_get(&hdmi_dev->dev);\n> +\tif (!cec->notifier) {\n> +\t\tret = -ENOMEM;\n> +\t\tgoto cec_error;\n> +\t}\n\nAh... I see why we need the HDMI device right away. This seems a little\nbrittle to me, for two reasons: what if the HDMI controller goes away?\nWill we be hanging on to a stale device? I mean, the device doesn't\nnecessarily have to go away, but what's the effect on CEC if the driver\nunbinds from the HDMI controller?\n\nSecondly, this creates a circular dependency. It seems to me like it'd\nactually be simpler if the CEC controller was a \"service provider\" that\nHDMI could use and \"request/release\" as appropriate.\n\nIn that case, the DT would look somewhat like this:\n\n\thdmi@... {\n\t\tcec = <&cec>;\n\t};\n\n\tcec: cec@... {\n\t\t...\n\t};\n\nAnd then the HDMI driver could do something like:\n\n\tcec = cec_get(&pdev->dev);\n\t/* register notifier, ... */\n\nThat way the dependency becomes unidirectional and it seems to me like\nthat would allow interactions between HDMI and CEC would become simpler\noverall.\n\nAnyway, this is something that could always be changed after the fact\n(except maybe for some bits needed for backwards-compatibility with old\ndevice trees), and this seems to work well enough as it is, so:\n\nAcked-by: Thierry Reding <treding@nvidia.com>","headers":{"Return-Path":"<devicetree-owner@vger.kernel.org>","X-Original-To":"incoming-dt@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-dt@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=devicetree-owner@vger.kernel.org; receiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"MMenr9t3\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3yHkNx2l0Wz9t4P\n\tfor <incoming-dt@patchwork.ozlabs.org>;\n\tThu, 19 Oct 2017 20:37:37 +1100 (AEDT)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752624AbdJSJhK (ORCPT\n\t<rfc822;incoming-dt@patchwork.ozlabs.org>);\n\tThu, 19 Oct 2017 05:37:10 -0400","from mail-qk0-f179.google.com ([209.85.220.179]:43374 \"EHLO\n\tmail-qk0-f179.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1752212AbdJSJhE (ORCPT\n\t<rfc822; devicetree@vger.kernel.org>); Thu, 19 Oct 2017 05:37:04 -0400","by mail-qk0-f179.google.com with SMTP id w134so9591887qkb.0;\n\tThu, 19 Oct 2017 02:37:04 -0700 (PDT)","from localhost\n\t(p200300E41BE4FD00CEAD5B94E1CFD280.dip0.t-ipconnect.de.\n\t[2003:e4:1be4:fd00:cead:5b94:e1cf:d280])\n\tby smtp.gmail.com with ESMTPSA id\n\tp52sm9418424qtc.44.2017.10.19.02.37.02\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tThu, 19 Oct 2017 02:37:02 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:in-reply-to:user-agent;\n\tbh=VOD/Ga2HN5qBzOCEkCwmljajMm1tGF8XBHBYGPgsbww=;\n\tb=MMenr9t3ndg0qqdQWJxbxD/N8oxBDyvFB+j+n46M3yyXcy2l92X3u/cXhFSb772kZ9\n\tbfg87G1xSqiiUYMpVRRc6gUWTO+UWI4tsdwEPXRxrCHiQlgKAhgjVPtzTcvOJJuFGEY+\n\tCjjKnPR3lDDuhjnOhaqVI9pEDr07fyxzNPGjaNYSeKujt+mV/7qOyK0n08HI251DHEAw\n\t44WeghtDpZlFDFFppkBrpzV32/B398H1+YovKSWsJsCr6t2ChSb1RUHvq2Q7KPCY+bjH\n\tPmmZAD8fP5PAUOQn8/P9pL/7McCDvfzzAcjM2s8BlzHpcGrDYryzWp07IYRJnxnVT3/W\n\tXBKA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:in-reply-to:user-agent;\n\tbh=VOD/Ga2HN5qBzOCEkCwmljajMm1tGF8XBHBYGPgsbww=;\n\tb=jCGZhkSICwByBRehXuuYhmUZlWImRFgHVpOcFoCggZ5L2iyhccjqbd5AMVRaUn8bak\n\txbkob0xmRVQBJanUZQQJ4Lum2BBnzgaZNbBUutUQ/x27SPxIrL3CEl4hRbO4CQpW+Nzl\n\tqttnB/VwUB5VTixxEzpwhTucswS+lsGBsII6oOl9LS6bi3zZUzRQ190XHBfABDYUMn/o\n\tY/Bd7kuPij0ELuH2vM/+W852qRPukYE5Do/tNLqKTOO/pUUKs7Vv0aiRbhSd0u4nM8dt\n\tOcfqaumYe7JKf191JnQr1fX/mB1G4Zul0aZ121WYKKKWhFa9DdGM955dR3iAmKTWVVEU\n\tpIyw==","X-Gm-Message-State":"AMCzsaWeT5B5LJyAPl0uzhKjfchjlrYzSAMogd/JWaySCWFnvk8ZtAR7\n\tGrgYQgIt8nFP/FE9kXPMsOlVFw==","X-Google-Smtp-Source":"ABhQp+RGraZlyaAxk9uaK9a2KgPlENNiG8Lica3Kf0Jf5j0ehDittqJNShGRle8J3JNqsGGIutdn7Q==","X-Received":"by 10.55.95.67 with SMTP id t64mr1084334qkb.249.1508405823467;\n\tThu, 19 Oct 2017 02:37:03 -0700 (PDT)","Date":"Thu, 19 Oct 2017 11:37:00 +0200","From":"Thierry Reding <thierry.reding@gmail.com>","To":"Hans Verkuil <hverkuil@xs4all.nl>","Cc":"linux-media@vger.kernel.org, linux-tegra@vger.kernel.org,\n\tdevicetree@vger.kernel.org, dri-devel@lists.freedesktop.org,\n\tHans Verkuil <hans.verkuil@cisco.com>","Subject":"Re: [PATCHv4 3/4] tegra-cec: add Tegra HDMI CEC driver","Message-ID":"<20171019093700.GF9005@ulmo>","References":"<20170911122952.33980-1-hverkuil@xs4all.nl>\n\t<20170911122952.33980-4-hverkuil@xs4all.nl>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\"; boundary=\"7cm2iqirTL37Ot+N\"","Content-Disposition":"inline","In-Reply-To":"<20170911122952.33980-4-hverkuil@xs4all.nl>","User-Agent":"Mutt/1.9.1 (2017-09-22)","Sender":"devicetree-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<devicetree.vger.kernel.org>","X-Mailing-List":"devicetree@vger.kernel.org"}},{"id":1790305,"web_url":"http://patchwork.ozlabs.org/comment/1790305/","msgid":"<20171019093811.GG9005@ulmo>","list_archive_url":null,"date":"2017-10-19T09:38:11","subject":"Re: [PATCHv4 4/4] drm/tegra: add cec-notifier support","submitter":{"id":26234,"url":"http://patchwork.ozlabs.org/api/people/26234/","name":"Thierry Reding","email":"thierry.reding@gmail.com"},"content":"On Mon, Sep 11, 2017 at 02:29:52PM +0200, Hans Verkuil wrote:\n> From: Hans Verkuil <hans.verkuil@cisco.com>\n> \n> In order to support CEC the HDMI driver has to inform the CEC driver\n> whenever the physical address changes. So when the EDID is read the\n> CEC driver has to be informed and whenever the hotplug detect goes\n> away.\n> \n> This is done through the cec-notifier framework.\n> \n> The link between the HDMI driver and the CEC driver is done through\n> the hdmi_phandle in the tegra-cec node in the device tree.\n> \n> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>\n> ---\n>  drivers/gpu/drm/tegra/Kconfig  | 1 +\n>  drivers/gpu/drm/tegra/drm.h    | 3 +++\n>  drivers/gpu/drm/tegra/hdmi.c   | 9 +++++++++\n>  drivers/gpu/drm/tegra/output.c | 6 ++++++\n>  4 files changed, 19 insertions(+)\n\nI've applied this to drm/tegra/for-next.\n\nThanks,\nThierry","headers":{"Return-Path":"<devicetree-owner@vger.kernel.org>","X-Original-To":"incoming-dt@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-dt@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=devicetree-owner@vger.kernel.org; receiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"qWH7sFAN\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3yHkPm2qGFz9t4P\n\tfor <incoming-dt@patchwork.ozlabs.org>;\n\tThu, 19 Oct 2017 20:38:20 +1100 (AEDT)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752600AbdJSJiQ (ORCPT\n\t<rfc822;incoming-dt@patchwork.ozlabs.org>);\n\tThu, 19 Oct 2017 05:38:16 -0400","from mail-qt0-f194.google.com ([209.85.216.194]:52288 \"EHLO\n\tmail-qt0-f194.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1752313AbdJSJiP (ORCPT\n\t<rfc822; devicetree@vger.kernel.org>); Thu, 19 Oct 2017 05:38:15 -0400","by mail-qt0-f194.google.com with SMTP id 31so13629455qtz.9;\n\tThu, 19 Oct 2017 02:38:14 -0700 (PDT)","from localhost\n\t(p200300E41BE4FD00CEAD5B94E1CFD280.dip0.t-ipconnect.de.\n\t[2003:e4:1be4:fd00:cead:5b94:e1cf:d280])\n\tby smtp.gmail.com with ESMTPSA id\n\tc13sm8903749qka.50.2017.10.19.02.38.13\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tThu, 19 Oct 2017 02:38:13 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:in-reply-to:user-agent;\n\tbh=NKpGeA5a9ZWXIpPhGjCyMfJc2hk/0O1sGv9fIR2rJtY=;\n\tb=qWH7sFANjYKWZrSJKLIWVs3xLPTMtlvYKXHEaji1UaPcNumNNPbm/vjDdfFGSbA71w\n\tQ+/yuqxWyb0eC7mRXM0s+75YCjWIq7PSlKuO1NrvrJ3wTmekQRt+5ixVO6dNIVQ6zz+p\n\tliRZPnNFDWlsvMg/IuAfhV5w+BrGrHBWvgi2RuQ5FOXaC4VUompY+kaBTU9gJcOklQUH\n\tXFWCpZlxFMsXoGCfPAjCKIRBiD6zamR0k+GcjqaEOAYZekRwex5KzYdqV/1YOEFG5KGl\n\t4BPGe1BAo/7bqsQ163D/moTyUgbcxpK+LdL3hBy/XuJwgOf0dOOvLQO3Y4MYyGuvUjQl\n\tkkeQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:in-reply-to:user-agent;\n\tbh=NKpGeA5a9ZWXIpPhGjCyMfJc2hk/0O1sGv9fIR2rJtY=;\n\tb=eh/NJlmDi9gYDRdVs8b554VaRzJ0hwOYaXlEYbmUxsUxWnfmR1KE4y4ahFCFs+DgrN\n\t5ayAkXFbAG0bD8PTzrXu2zi/qnFCM0HrqyjKnNxkH6h7moTELH8rUyfVGX5Lki2c6P0g\n\tUffEUe4Xd2qXuEWCyxVrwNUBLBEl5psaXeJYbxtW5KUHNAH1ONwG+ae0lB+cNwzv50cM\n\tjZKbZBwZqQc+PbS4kaV+hDO7mdPkQAQAw/LIC/hQEY/SO2gxD/MdvTwqFWogvjr1EssE\n\tOuFJCUPriMEecdd9B6CAjxTlKCzQIjdmOsHENQaT0at252MXD/UCuRxNbBbg8SLDvsrb\n\thG/w==","X-Gm-Message-State":"AMCzsaWgQ+LxcH5Zs/TynnfN1H6V/pmz3y0scGP4WyrDl+7cscdkN54F\n\tqgxXN4wVqLRjQyY3wAP029w=","X-Google-Smtp-Source":"ABhQp+TbM0NkqBCIaJ/Fc+7hR2h5tsyLJceI9oaZFL8aLFQ28/rLxW4rzqhN2VlvU6+xfojIj3lzQA==","X-Received":"by 10.200.53.12 with SMTP id y12mr1271624qtb.84.1508405894217;\n\tThu, 19 Oct 2017 02:38:14 -0700 (PDT)","Date":"Thu, 19 Oct 2017 11:38:11 +0200","From":"Thierry Reding <thierry.reding@gmail.com>","To":"Hans Verkuil <hverkuil@xs4all.nl>","Cc":"linux-media@vger.kernel.org, linux-tegra@vger.kernel.org,\n\tdevicetree@vger.kernel.org, dri-devel@lists.freedesktop.org,\n\tHans Verkuil <hans.verkuil@cisco.com>","Subject":"Re: [PATCHv4 4/4] drm/tegra: add cec-notifier support","Message-ID":"<20171019093811.GG9005@ulmo>","References":"<20170911122952.33980-1-hverkuil@xs4all.nl>\n\t<20170911122952.33980-5-hverkuil@xs4all.nl>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\"; boundary=\"7lMq7vMTJT4tNk0a\"","Content-Disposition":"inline","In-Reply-To":"<20170911122952.33980-5-hverkuil@xs4all.nl>","User-Agent":"Mutt/1.9.1 (2017-09-22)","Sender":"devicetree-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<devicetree.vger.kernel.org>","X-Mailing-List":"devicetree@vger.kernel.org"}},{"id":1790309,"web_url":"http://patchwork.ozlabs.org/comment/1790309/","msgid":"<20171019093910.GH9005@ulmo>","list_archive_url":null,"date":"2017-10-19T09:39:10","subject":"Re: [PATCHv4 0/4] tegra-cec: add Tegra HDMI CEC support","submitter":{"id":26234,"url":"http://patchwork.ozlabs.org/api/people/26234/","name":"Thierry Reding","email":"thierry.reding@gmail.com"},"content":"On Thu, Oct 19, 2017 at 11:36:14AM +0200, Hans Verkuil wrote:\n> On 10/19/17 11:20, Thierry Reding wrote:\n> > On Mon, Sep 11, 2017 at 02:29:48PM +0200, Hans Verkuil wrote:\n> >> From: Hans Verkuil <hans.verkuil@cisco.com>\n> >>\n> >> This patch series adds support for the Tegra CEC functionality.\n> >>\n> >> This v4 has been rebased to the latest 4.14 pre-rc1 mainline.\n> >>\n> >> Please review! Other than for the bindings that are now Acked I have not\n> >> received any feedback.\n> >>\n> >> The first patch documents the CEC bindings, the second adds support\n> >> for this to tegra124.dtsi and enables it for the Jetson TK1.\n> >>\n> >> The third patch adds the CEC driver itself and the final patch adds\n> >> the cec notifier support to the drm/tegra driver in order to notify\n> >> the CEC driver whenever the physical address changes.\n> >>\n> >> I expect that the dts changes apply as well to the Tegra X1/X2 and possibly\n> >> other Tegra SoCs, but I can only test this with my Jetson TK1 board.\n> >>\n> >> The dt-bindings and the tegra-cec driver would go in through the media\n> >> subsystem, the drm/tegra part through the drm subsystem and the dts\n> >> changes through (I guess) the linux-tegra developers. Luckily they are\n> >> all independent of one another.\n> >>\n> >> To test this you need the CEC utilities from git://linuxtv.org/v4l-utils.git.\n> >>\n> >> To build this:\n> >>\n> >> git clone git://linuxtv.org/v4l-utils.git\n> >> cd v4l-utils\n> >> ./bootstrap.sh; ./configure\n> >> make\n> >> sudo make install # optional, you really only need utils/cec*\n> >>\n> >> To test:\n> >>\n> >> cec-ctl --playback # configure as playback device\n> >> cec-ctl -S # detect all connected CEC devices\n> > \n> > I finally got around to test this. Unfortunately I wasn't able to\n> > properly show connected CEC devices, but I think that may just be\n> > because the monitor I was testing against doesn't support CEC. I\n> > will have to check against a different device eventually to check\n> > that it properly enumerates, though I suspect you've already done\n> > quite extensive testing yourself.\n> \n> Yes, you need a TV with CEC. Most (all?) PC monitors do not support this.\n> I never understood why not.\n> \n> So just to confirm: you've merged this driver for 4.15?\n\nI've applied the drm/tegra bits to drm/tegra/for-next and pulled the ARM\nDT changes into the Tegra tree for v4.15. I think we had agreed that you\nwould take the DT bindings and CEC driver through your tree?\n\nThierry","headers":{"Return-Path":"<devicetree-owner@vger.kernel.org>","X-Original-To":"incoming-dt@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-dt@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=devicetree-owner@vger.kernel.org; receiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"L9s0ecdS\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3yHkQs53Kdz9s9Y\n\tfor <incoming-dt@patchwork.ozlabs.org>;\n\tThu, 19 Oct 2017 20:39:17 +1100 (AEDT)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752313AbdJSJjP (ORCPT\n\t<rfc822;incoming-dt@patchwork.ozlabs.org>);\n\tThu, 19 Oct 2017 05:39:15 -0400","from mail-qt0-f196.google.com ([209.85.216.196]:56192 \"EHLO\n\tmail-qt0-f196.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751933AbdJSJjO (ORCPT\n\t<rfc822; devicetree@vger.kernel.org>); Thu, 19 Oct 2017 05:39:14 -0400","by mail-qt0-f196.google.com with SMTP id v41so13609876qtv.12;\n\tThu, 19 Oct 2017 02:39:13 -0700 (PDT)","from localhost\n\t(p200300E41BE4FD00CEAD5B94E1CFD280.dip0.t-ipconnect.de.\n\t[2003:e4:1be4:fd00:cead:5b94:e1cf:d280])\n\tby smtp.gmail.com with ESMTPSA id\n\ta189sm7319238qkb.84.2017.10.19.02.39.12\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tThu, 19 Oct 2017 02:39:12 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:in-reply-to:user-agent;\n\tbh=qso//h/DiByIudgqxL+hw8bbmd3Ezp+kDbvCO2Q7fKk=;\n\tb=L9s0ecdSrVzWRTqAvQ+H82DVKAldwQwoqC+q7dWAwZ1zpyEsTUaWOoWPiAbvmnx4vK\n\tb1HDF1zQqit3GbZNIo3THhpPx6KFcABvzbinaBSk8QOhoZFK4IhnvNnkNnz7HFIM+IZl\n\tP2TcxhD46AKmm5zWiaFZm69ziDPr67EOkuG9VD8ko2UaHd2AVV+VC33Vpo3tVm3cTyyf\n\tb4k+37r/xouKhnuZMs2GYQxd6Q5WpK3piAyAOh0Ws6re7YkpWTuTvN69yJSmVdlskr5D\n\trqFUN7CmNLEWyHTqWSvp1pXgMDJiJWhFmmnM6K/BKIIU3iFHRIQpqUAixif9rIb5BN0l\n\tPypw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:in-reply-to:user-agent;\n\tbh=qso//h/DiByIudgqxL+hw8bbmd3Ezp+kDbvCO2Q7fKk=;\n\tb=TWg8PCxgpQ5cQA7V1CiKUTm0fvC1UqwhuLld8dPjXToTyhP/2re/Lxy0FuJJJbu1H3\n\tHf7UyxoX0G/f+UIe+5HdfZNrSs2JcNp6TWBVBEfgFCmP3PleTpGoexrntuSvvMFZcPH0\n\ttfYEeb9QmQhEQtwweaxD5u5qjgJDLjLir962n+iBKWVGTZHn2FoxotbPCLokMy4bQjnq\n\tCBfs3+r85dhga6v8PbQipPAUVWl8o62foHpUCHIhySIdHkcIW+3LZmc4F0XXutiG62sK\n\tUZ6HAjB/Y9odZ9AHt8hpW+IkK5DB4exxRuziCttPESnXa5Y69PlgehhSoX5WIAfr5hJ+\n\t2vUQ==","X-Gm-Message-State":"AMCzsaVjB1SBA8foSlzYnS9AOkvmZN/lyx7dJ4e6V+fyGkuFRF37QOvV\n\t0aSYn3FToVL0ccftUgrHgNs=","X-Google-Smtp-Source":"ABhQp+QceLWfRNoO2w7VVb80NcrN+gWK0pW1RK0gRe99XXV854sDWdzHMMd+MpSeSLbWRO5FTZHT0w==","X-Received":"by 10.200.15.40 with SMTP id e37mr1186624qtk.159.1508405953135; \n\tThu, 19 Oct 2017 02:39:13 -0700 (PDT)","Date":"Thu, 19 Oct 2017 11:39:10 +0200","From":"Thierry Reding <thierry.reding@gmail.com>","To":"Hans Verkuil <hverkuil@xs4all.nl>","Cc":"linux-media@vger.kernel.org, linux-tegra@vger.kernel.org,\n\tdevicetree@vger.kernel.org, dri-devel@lists.freedesktop.org","Subject":"Re: [PATCHv4 0/4] tegra-cec: add Tegra HDMI CEC support","Message-ID":"<20171019093910.GH9005@ulmo>","References":"<20170911122952.33980-1-hverkuil@xs4all.nl>\n\t<20171019092054.GC9005@ulmo>\n\t<0f43276f-0a89-8caa-6522-253458e3ad08@xs4all.nl>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\"; boundary=\"9jHkwA2TBA/ec6v+\"","Content-Disposition":"inline","In-Reply-To":"<0f43276f-0a89-8caa-6522-253458e3ad08@xs4all.nl>","User-Agent":"Mutt/1.9.1 (2017-09-22)","Sender":"devicetree-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<devicetree.vger.kernel.org>","X-Mailing-List":"devicetree@vger.kernel.org"}},{"id":1790552,"web_url":"http://patchwork.ozlabs.org/comment/1790552/","msgid":"<20171019131716.GT9005@ulmo>","list_archive_url":null,"date":"2017-10-19T13:17:16","subject":"Re: [PATCHv4 4/4] drm/tegra: add cec-notifier support","submitter":{"id":26234,"url":"http://patchwork.ozlabs.org/api/people/26234/","name":"Thierry Reding","email":"thierry.reding@gmail.com"},"content":"On Mon, Sep 11, 2017 at 02:29:52PM +0200, Hans Verkuil wrote:\n> From: Hans Verkuil <hans.verkuil@cisco.com>\n> \n> In order to support CEC the HDMI driver has to inform the CEC driver\n> whenever the physical address changes. So when the EDID is read the\n> CEC driver has to be informed and whenever the hotplug detect goes\n> away.\n> \n> This is done through the cec-notifier framework.\n> \n> The link between the HDMI driver and the CEC driver is done through\n> the hdmi_phandle in the tegra-cec node in the device tree.\n> \n> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>\n> ---\n>  drivers/gpu/drm/tegra/Kconfig  | 1 +\n>  drivers/gpu/drm/tegra/drm.h    | 3 +++\n>  drivers/gpu/drm/tegra/hdmi.c   | 9 +++++++++\n>  drivers/gpu/drm/tegra/output.c | 6 ++++++\n>  4 files changed, 19 insertions(+)\n> \n> diff --git a/drivers/gpu/drm/tegra/Kconfig b/drivers/gpu/drm/tegra/Kconfig\n> index 2db29d67193d..c882918c2024 100644\n> --- a/drivers/gpu/drm/tegra/Kconfig\n> +++ b/drivers/gpu/drm/tegra/Kconfig\n> @@ -8,6 +8,7 @@ config DRM_TEGRA\n>  \tselect DRM_PANEL\n>  \tselect TEGRA_HOST1X\n>  \tselect IOMMU_IOVA if IOMMU_SUPPORT\n> +\tselect CEC_CORE if CEC_NOTIFIER\n>  \thelp\n>  \t  Choose this option if you have an NVIDIA Tegra SoC.\n>  \n> diff --git a/drivers/gpu/drm/tegra/drm.h b/drivers/gpu/drm/tegra/drm.h\n> index 6d6da01282f3..c0a18b60caf1 100644\n> --- a/drivers/gpu/drm/tegra/drm.h\n> +++ b/drivers/gpu/drm/tegra/drm.h\n> @@ -212,6 +212,8 @@ int tegra_dc_state_setup_clock(struct tegra_dc *dc,\n>  \t\t\t       struct clk *clk, unsigned long pclk,\n>  \t\t\t       unsigned int div);\n>  \n> +struct cec_notifier;\n> +\n>  struct tegra_output {\n>  \tstruct device_node *of_node;\n>  \tstruct device *dev;\n> @@ -219,6 +221,7 @@ struct tegra_output {\n>  \tstruct drm_panel *panel;\n>  \tstruct i2c_adapter *ddc;\n>  \tconst struct edid *edid;\n> +\tstruct cec_notifier *notifier;\n>  \tunsigned int hpd_irq;\n>  \tint hpd_gpio;\n>  \tenum of_gpio_flags hpd_gpio_flags;\n> diff --git a/drivers/gpu/drm/tegra/hdmi.c b/drivers/gpu/drm/tegra/hdmi.c\n> index cda0491ed6bf..fbf14e1efd0e 100644\n> --- a/drivers/gpu/drm/tegra/hdmi.c\n> +++ b/drivers/gpu/drm/tegra/hdmi.c\n> @@ -21,6 +21,8 @@\n>  \n>  #include <sound/hda_verbs.h>\n>  \n> +#include <media/cec-notifier.h>\n> +\n>  #include \"hdmi.h\"\n>  #include \"drm.h\"\n>  #include \"dc.h\"\n> @@ -1720,6 +1722,10 @@ static int tegra_hdmi_probe(struct platform_device *pdev)\n>  \t\treturn PTR_ERR(hdmi->vdd);\n>  \t}\n>  \n> +\thdmi->output.notifier = cec_notifier_get(&pdev->dev);\n> +\tif (hdmi->output.notifier == NULL)\n> +\t\treturn -ENOMEM;\n> +\n>  \thdmi->output.dev = &pdev->dev;\n>  \n>  \terr = tegra_output_probe(&hdmi->output);\n> @@ -1778,6 +1784,9 @@ static int tegra_hdmi_remove(struct platform_device *pdev)\n>  \n>  \ttegra_output_remove(&hdmi->output);\n>  \n> +\tif (hdmi->output.notifier)\n> +\t\tcec_notifier_put(hdmi->output.notifier);\n> +\n>  \treturn 0;\n>  }\n>  \n> diff --git a/drivers/gpu/drm/tegra/output.c b/drivers/gpu/drm/tegra/output.c\n> index 595d1ec3e02e..57c052521a44 100644\n> --- a/drivers/gpu/drm/tegra/output.c\n> +++ b/drivers/gpu/drm/tegra/output.c\n> @@ -11,6 +11,8 @@\n>  #include <drm/drm_panel.h>\n>  #include \"drm.h\"\n>  \n> +#include <media/cec-notifier.h>\n> +\n>  int tegra_output_connector_get_modes(struct drm_connector *connector)\n>  {\n>  \tstruct tegra_output *output = connector_to_output(connector);\n> @@ -33,6 +35,7 @@ int tegra_output_connector_get_modes(struct drm_connector *connector)\n>  \t\tedid = drm_get_edid(connector, output->ddc);\n>  \n>  \tdrm_mode_connector_update_edid_property(connector, edid);\n> +\tcec_notifier_set_phys_addr_from_edid(output->notifier, edid);\n\nI had to guard this with:\n\n\t#if IS_REACHABLE(CONFIG_CEC_CORE) && IS_ENABLED(CONFIG_CEC_NOTIFIER)\n\t...\n\t#endif\n\nto enable this driver to be built without CEC_NOTIFIER enabled. I see\nthat there are stubs defined if the above is false, but for some reason\nthey don't seem to be there for me either.\n\n>  \n>  \tif (edid) {\n>  \t\terr = drm_add_edid_modes(connector, edid);\n> @@ -68,6 +71,9 @@ tegra_output_connector_detect(struct drm_connector *connector, bool force)\n>  \t\t\tstatus = connector_status_connected;\n>  \t}\n>  \n> +\tif (status != connector_status_connected)\n> +\t\tcec_notifier_phys_addr_invalidate(output->notifier);\n\nSame here.\n\nThierry","headers":{"Return-Path":"<devicetree-owner@vger.kernel.org>","X-Original-To":"incoming-dt@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-dt@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=devicetree-owner@vger.kernel.org; receiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"OOiduKAq\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3yHqGX0P6Cz9t0F\n\tfor <incoming-dt@patchwork.ozlabs.org>;\n\tFri, 20 Oct 2017 00:17:24 +1100 (AEDT)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751501AbdJSNRV (ORCPT\n\t<rfc822;incoming-dt@patchwork.ozlabs.org>);\n\tThu, 19 Oct 2017 09:17:21 -0400","from mail-qk0-f194.google.com ([209.85.220.194]:45888 \"EHLO\n\tmail-qk0-f194.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751012AbdJSNRU (ORCPT\n\t<rfc822; devicetree@vger.kernel.org>); Thu, 19 Oct 2017 09:17:20 -0400","by mail-qk0-f194.google.com with SMTP id f199so10280227qke.2;\n\tThu, 19 Oct 2017 06:17:19 -0700 (PDT)","from localhost\n\t(p200300E41BE4FD00CEAD5B94E1CFD280.dip0.t-ipconnect.de.\n\t[2003:e4:1be4:fd00:cead:5b94:e1cf:d280])\n\tby smtp.gmail.com with ESMTPSA id\n\ti1sm9667997qta.19.2017.10.19.06.17.17\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tThu, 19 Oct 2017 06:17:18 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:in-reply-to:user-agent;\n\tbh=9vxh3IzdFETec9qtOg0VavX6NFKolKxnrrN+zSe46Q8=;\n\tb=OOiduKAqbDQBUFv1z58efH0e3Qu2GIxgo91hiKbacFmSDjusKdL1d82IsgB4fmyDNH\n\tGhHZpmfjdVtTlLN0N63tUI8OiJpjVa5WgiB8kJdcZ1fuj7kHrdiwxjEbR6tQRxCDCKhY\n\tF0X8+GKQSL685M01CbiIS4F/gjsrZwKuHuENhqmM78m4wBmz8mNgx2+ZXkJRKXt1tmHv\n\tiOB5GPqh1FSgy0eVNd3RS5+bp18/YO5GRV7ffssfbpe3hdgn6XDsnQCSONqOwXqySmpv\n\t9Sa9vwWgY5YmguYufQIr2jfXVmJ7vgATGMF10V6rKba66N08yeb7D3jelb99Pq2ENCfg\n\tZj8A==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:in-reply-to:user-agent;\n\tbh=9vxh3IzdFETec9qtOg0VavX6NFKolKxnrrN+zSe46Q8=;\n\tb=in0imP1mTmX9G/lbNSABcYVfcwB8ZG1UYb5uVTcTyyQoFCmxXmKZbCN+njNArze2y4\n\tyE2QJQSOvsl5Qgn/FRSx0Pg+zLGPUePn0QEuuyZM2Nyuea2Px7ldL59oOQwGDtGBpXfe\n\tqifDPfLweTNSmaQ5wOK++Y3tLPcpV9G7nlTflmbDZDhzyixFqRfO1fMGPy7fWn9yRIOE\n\t5Vu0MQGEjFqxpX1Xs3MsYNgTTLQM1srHbzVG7BgGBzlpFyz6wYS1yzWfBUAkh6Am4Ow2\n\t47iIbGUvHeQdHwz5xsgdh1dGZoD3CRfhFJDFaFPFDObRoVJSWFlXGxGTymfWV7q0PaBd\n\t6jGA==","X-Gm-Message-State":"AMCzsaVIz3wtj9LRI/UN+crW7f1LG2qzLYMz2oHqFM16mA3NGXAflHA3\n\tL5M6U/BqQlsXje88JKubqdbk3A==","X-Google-Smtp-Source":"ABhQp+Q6Cg2MrUzXqArLtq8HuQkHa6Y8ik77Pk1NlfkEtLSaoxSdDyl9qWTUIl4o0yPYZn+AOz9aoA==","X-Received":"by 10.55.20.72 with SMTP id e69mr1748149qkh.194.1508419039055;\n\tThu, 19 Oct 2017 06:17:19 -0700 (PDT)","Date":"Thu, 19 Oct 2017 15:17:16 +0200","From":"Thierry Reding <thierry.reding@gmail.com>","To":"Hans Verkuil <hverkuil@xs4all.nl>","Cc":"linux-media@vger.kernel.org, linux-tegra@vger.kernel.org,\n\tdevicetree@vger.kernel.org, dri-devel@lists.freedesktop.org,\n\tHans Verkuil <hans.verkuil@cisco.com>","Subject":"Re: [PATCHv4 4/4] drm/tegra: add cec-notifier support","Message-ID":"<20171019131716.GT9005@ulmo>","References":"<20170911122952.33980-1-hverkuil@xs4all.nl>\n\t<20170911122952.33980-5-hverkuil@xs4all.nl>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\"; boundary=\"mgIE+9cwyCTt+85Z\"","Content-Disposition":"inline","In-Reply-To":"<20170911122952.33980-5-hverkuil@xs4all.nl>","User-Agent":"Mutt/1.9.1 (2017-09-22)","Sender":"devicetree-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<devicetree.vger.kernel.org>","X-Mailing-List":"devicetree@vger.kernel.org"}},{"id":1790569,"web_url":"http://patchwork.ozlabs.org/comment/1790569/","msgid":"<20171019133007.GU9005@ulmo>","list_archive_url":null,"date":"2017-10-19T13:30:07","subject":"Re: [PATCHv4 4/4] drm/tegra: add cec-notifier support","submitter":{"id":26234,"url":"http://patchwork.ozlabs.org/api/people/26234/","name":"Thierry Reding","email":"thierry.reding@gmail.com"},"content":"On Thu, Oct 19, 2017 at 03:17:16PM +0200, Thierry Reding wrote:\n> On Mon, Sep 11, 2017 at 02:29:52PM +0200, Hans Verkuil wrote:\n> > From: Hans Verkuil <hans.verkuil@cisco.com>\n> > \n> > In order to support CEC the HDMI driver has to inform the CEC driver\n> > whenever the physical address changes. So when the EDID is read the\n> > CEC driver has to be informed and whenever the hotplug detect goes\n> > away.\n> > \n> > This is done through the cec-notifier framework.\n> > \n> > The link between the HDMI driver and the CEC driver is done through\n> > the hdmi_phandle in the tegra-cec node in the device tree.\n> > \n> > Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>\n> > ---\n> >  drivers/gpu/drm/tegra/Kconfig  | 1 +\n> >  drivers/gpu/drm/tegra/drm.h    | 3 +++\n> >  drivers/gpu/drm/tegra/hdmi.c   | 9 +++++++++\n> >  drivers/gpu/drm/tegra/output.c | 6 ++++++\n> >  4 files changed, 19 insertions(+)\n> > \n> > diff --git a/drivers/gpu/drm/tegra/Kconfig b/drivers/gpu/drm/tegra/Kconfig\n> > index 2db29d67193d..c882918c2024 100644\n> > --- a/drivers/gpu/drm/tegra/Kconfig\n> > +++ b/drivers/gpu/drm/tegra/Kconfig\n> > @@ -8,6 +8,7 @@ config DRM_TEGRA\n> >  \tselect DRM_PANEL\n> >  \tselect TEGRA_HOST1X\n> >  \tselect IOMMU_IOVA if IOMMU_SUPPORT\n> > +\tselect CEC_CORE if CEC_NOTIFIER\n> >  \thelp\n> >  \t  Choose this option if you have an NVIDIA Tegra SoC.\n> >  \n> > diff --git a/drivers/gpu/drm/tegra/drm.h b/drivers/gpu/drm/tegra/drm.h\n> > index 6d6da01282f3..c0a18b60caf1 100644\n> > --- a/drivers/gpu/drm/tegra/drm.h\n> > +++ b/drivers/gpu/drm/tegra/drm.h\n> > @@ -212,6 +212,8 @@ int tegra_dc_state_setup_clock(struct tegra_dc *dc,\n> >  \t\t\t       struct clk *clk, unsigned long pclk,\n> >  \t\t\t       unsigned int div);\n> >  \n> > +struct cec_notifier;\n> > +\n> >  struct tegra_output {\n> >  \tstruct device_node *of_node;\n> >  \tstruct device *dev;\n> > @@ -219,6 +221,7 @@ struct tegra_output {\n> >  \tstruct drm_panel *panel;\n> >  \tstruct i2c_adapter *ddc;\n> >  \tconst struct edid *edid;\n> > +\tstruct cec_notifier *notifier;\n> >  \tunsigned int hpd_irq;\n> >  \tint hpd_gpio;\n> >  \tenum of_gpio_flags hpd_gpio_flags;\n> > diff --git a/drivers/gpu/drm/tegra/hdmi.c b/drivers/gpu/drm/tegra/hdmi.c\n> > index cda0491ed6bf..fbf14e1efd0e 100644\n> > --- a/drivers/gpu/drm/tegra/hdmi.c\n> > +++ b/drivers/gpu/drm/tegra/hdmi.c\n> > @@ -21,6 +21,8 @@\n> >  \n> >  #include <sound/hda_verbs.h>\n> >  \n> > +#include <media/cec-notifier.h>\n> > +\n> >  #include \"hdmi.h\"\n> >  #include \"drm.h\"\n> >  #include \"dc.h\"\n> > @@ -1720,6 +1722,10 @@ static int tegra_hdmi_probe(struct platform_device *pdev)\n> >  \t\treturn PTR_ERR(hdmi->vdd);\n> >  \t}\n> >  \n> > +\thdmi->output.notifier = cec_notifier_get(&pdev->dev);\n> > +\tif (hdmi->output.notifier == NULL)\n> > +\t\treturn -ENOMEM;\n> > +\n> >  \thdmi->output.dev = &pdev->dev;\n> >  \n> >  \terr = tegra_output_probe(&hdmi->output);\n> > @@ -1778,6 +1784,9 @@ static int tegra_hdmi_remove(struct platform_device *pdev)\n> >  \n> >  \ttegra_output_remove(&hdmi->output);\n> >  \n> > +\tif (hdmi->output.notifier)\n> > +\t\tcec_notifier_put(hdmi->output.notifier);\n> > +\n> >  \treturn 0;\n> >  }\n> >  \n> > diff --git a/drivers/gpu/drm/tegra/output.c b/drivers/gpu/drm/tegra/output.c\n> > index 595d1ec3e02e..57c052521a44 100644\n> > --- a/drivers/gpu/drm/tegra/output.c\n> > +++ b/drivers/gpu/drm/tegra/output.c\n> > @@ -11,6 +11,8 @@\n> >  #include <drm/drm_panel.h>\n> >  #include \"drm.h\"\n> >  \n> > +#include <media/cec-notifier.h>\n> > +\n> >  int tegra_output_connector_get_modes(struct drm_connector *connector)\n> >  {\n> >  \tstruct tegra_output *output = connector_to_output(connector);\n> > @@ -33,6 +35,7 @@ int tegra_output_connector_get_modes(struct drm_connector *connector)\n> >  \t\tedid = drm_get_edid(connector, output->ddc);\n> >  \n> >  \tdrm_mode_connector_update_edid_property(connector, edid);\n> > +\tcec_notifier_set_phys_addr_from_edid(output->notifier, edid);\n> \n> I had to guard this with:\n> \n> \t#if IS_REACHABLE(CONFIG_CEC_CORE) && IS_ENABLED(CONFIG_CEC_NOTIFIER)\n> \t...\n> \t#endif\n> \n> to enable this driver to be built without CEC_NOTIFIER enabled. I see\n> that there are stubs defined if the above is false, but for some reason\n> they don't seem to be there for me either.\n\nNevermind that. This was not actually failing. However, ...\n\n> >  \n> >  \tif (edid) {\n> >  \t\terr = drm_add_edid_modes(connector, edid);\n> > @@ -68,6 +71,9 @@ tegra_output_connector_detect(struct drm_connector *connector, bool force)\n> >  \t\t\tstatus = connector_status_connected;\n> >  \t}\n> >  \n> > +\tif (status != connector_status_connected)\n> > +\t\tcec_notifier_phys_addr_invalidate(output->notifier);\n\nThis doesn't seem to exist in v4.14-rc1 which is the base for the\ndrm/tegra tree for v4.15. I see this function will be introduced in\nv4.15 via the media tree.\n\nHow about if I replace this by:\n\n\tcec_notifier_set_phys(output->notifier, CEC_PHYS_ADDR_INVALID);\n\nfor now and switch it over to the new function after v4.15-rc1? That way\nwe can avoid the extra dependency between the media and drm trees.\n\nThierry","headers":{"Return-Path":"<devicetree-owner@vger.kernel.org>","X-Original-To":"incoming-dt@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-dt@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=devicetree-owner@vger.kernel.org; receiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"FH0SJ1Wv\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3yHqYL4Jlrz9t44\n\tfor <incoming-dt@patchwork.ozlabs.org>;\n\tFri, 20 Oct 2017 00:30:14 +1100 (AEDT)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752838AbdJSNaM (ORCPT\n\t<rfc822;incoming-dt@patchwork.ozlabs.org>);\n\tThu, 19 Oct 2017 09:30:12 -0400","from mail-qk0-f195.google.com ([209.85.220.195]:43892 \"EHLO\n\tmail-qk0-f195.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1752687AbdJSNaL (ORCPT\n\t<rfc822; devicetree@vger.kernel.org>); Thu, 19 Oct 2017 09:30:11 -0400","by mail-qk0-f195.google.com with SMTP id w134so10341253qkb.0;\n\tThu, 19 Oct 2017 06:30:10 -0700 (PDT)","from localhost\n\t(p200300E41BE4FD00CEAD5B94E1CFD280.dip0.t-ipconnect.de.\n\t[2003:e4:1be4:fd00:cead:5b94:e1cf:d280])\n\tby smtp.gmail.com with ESMTPSA id\n\ts14sm4161219qtc.65.2017.10.19.06.30.09\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tThu, 19 Oct 2017 06:30:09 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:in-reply-to:user-agent;\n\tbh=dCfwfYXaEvNOQA8Di8djCQLA9xxPDk2x2cnMw6+6wl0=;\n\tb=FH0SJ1WvqcDbKYtktr0HmpBmLPt24/nINo7wE+cn/i/yB8x/wKE+ct6fviYD2mG88R\n\t5VM+3TfqJHmP6IheLhpxQ0WKdlO7pLQb+UMn5FvuHGlfmWJBFl0dtuIQztFUGJJKQ72H\n\tEVoQkgZT111yGExq2jMXs8hn0YVQJm/sQ6u/25TZBcjq6QWYKRYYTxpuKpAOhUhIyPrS\n\t0EfO4wDPIoJoez7vJmCfjJtvlilXGuBmzDrbDzBLTHYBT6J8418cJbX1UGz2WVU/aBl6\n\tkTVJ5G5ZeyfkIu3QJd1XTIonV2HSFNs1EwNqb9nsOtNf9L7Awd2Phmu608eIC2zaTTM/\n\tSKnQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:in-reply-to:user-agent;\n\tbh=dCfwfYXaEvNOQA8Di8djCQLA9xxPDk2x2cnMw6+6wl0=;\n\tb=GXmiP8mbXV97Tdlt1Y1ixCN+uTGlkcbsCTNhS5fmlWeBmw2OjDF0pC7h57Fqy5vATK\n\tJw3p9aRaKTkFC/YChHKJ6k3itdWLFLA7IQ+UVO/P7g9GR5dQvoyYcFz1vJJcvNhGbBKM\n\t6U7VgCCwVMcvALNYsQxvcayygIaf3UWdAYTZVehHEszJ9+wXFNQzlIN6rLZFR9wo7Hm0\n\tkGDyysDJ9O9x1ukvQR3NraRlWtIMmbhpqy/RSq5RfGfcy96G9xamJuDz7Hk7lVuk5oLO\n\tZ49Gfz2FT7fQ5/JnjyZ3T5dmcyJeChsdYNlNFz3ovmHsVhstGe25UPB7FQPGAX3ol57w\n\tgpbA==","X-Gm-Message-State":"AMCzsaUiOPYIlD9xRqjDD3PE3LcCltYm82fQwZOMEnlvLJtVC+mHhJ9G\n\tfVuicvccJ0AFMGy2eBdpbOk=","X-Google-Smtp-Source":"ABhQp+STTbqQH4qufaNhXRvqajLdBXAHHxJ6i7bLGt2cSx5+TQ8526cwFwo7fyaVQCzO0CNkQzi2gA==","X-Received":"by 10.55.204.2 with SMTP id r2mr1899756qki.316.1508419810184;\n\tThu, 19 Oct 2017 06:30:10 -0700 (PDT)","Date":"Thu, 19 Oct 2017 15:30:07 +0200","From":"Thierry Reding <thierry.reding@gmail.com>","To":"Hans Verkuil <hverkuil@xs4all.nl>","Cc":"linux-media@vger.kernel.org, linux-tegra@vger.kernel.org,\n\tdevicetree@vger.kernel.org, dri-devel@lists.freedesktop.org,\n\tHans Verkuil <hans.verkuil@cisco.com>","Subject":"Re: [PATCHv4 4/4] drm/tegra: add cec-notifier support","Message-ID":"<20171019133007.GU9005@ulmo>","References":"<20170911122952.33980-1-hverkuil@xs4all.nl>\n\t<20170911122952.33980-5-hverkuil@xs4all.nl>\n\t<20171019131716.GT9005@ulmo>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\"; boundary=\"1PHmS26pdpOR3Xc0\"","Content-Disposition":"inline","In-Reply-To":"<20171019131716.GT9005@ulmo>","User-Agent":"Mutt/1.9.1 (2017-09-22)","Sender":"devicetree-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<devicetree.vger.kernel.org>","X-Mailing-List":"devicetree@vger.kernel.org"}},{"id":1790578,"web_url":"http://patchwork.ozlabs.org/comment/1790578/","msgid":"<7e1fcffd-76dc-c4f2-942c-b9872f73fff0@cisco.com>","list_archive_url":null,"date":"2017-10-19T13:37:43","subject":"Re: [PATCHv4 4/4] drm/tegra: add cec-notifier support","submitter":{"id":26081,"url":"http://patchwork.ozlabs.org/api/people/26081/","name":"Hans Verkuil (hansverk)","email":"hansverk@cisco.com"},"content":"On 10/19/17 15:30, Thierry Reding wrote:\n> On Thu, Oct 19, 2017 at 03:17:16PM +0200, Thierry Reding wrote:\n>> On Mon, Sep 11, 2017 at 02:29:52PM +0200, Hans Verkuil wrote:\n>>> From: Hans Verkuil <hans.verkuil@cisco.com>\n>>>\n>>> In order to support CEC the HDMI driver has to inform the CEC driver\n>>> whenever the physical address changes. So when the EDID is read the\n>>> CEC driver has to be informed and whenever the hotplug detect goes\n>>> away.\n>>>\n>>> This is done through the cec-notifier framework.\n>>>\n>>> The link between the HDMI driver and the CEC driver is done through\n>>> the hdmi_phandle in the tegra-cec node in the device tree.\n>>>\n>>> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>\n>>> ---\n>>>  drivers/gpu/drm/tegra/Kconfig  | 1 +\n>>>  drivers/gpu/drm/tegra/drm.h    | 3 +++\n>>>  drivers/gpu/drm/tegra/hdmi.c   | 9 +++++++++\n>>>  drivers/gpu/drm/tegra/output.c | 6 ++++++\n>>>  4 files changed, 19 insertions(+)\n>>>\n>>> diff --git a/drivers/gpu/drm/tegra/Kconfig b/drivers/gpu/drm/tegra/Kconfig\n>>> index 2db29d67193d..c882918c2024 100644\n>>> --- a/drivers/gpu/drm/tegra/Kconfig\n>>> +++ b/drivers/gpu/drm/tegra/Kconfig\n>>> @@ -8,6 +8,7 @@ config DRM_TEGRA\n>>>  \tselect DRM_PANEL\n>>>  \tselect TEGRA_HOST1X\n>>>  \tselect IOMMU_IOVA if IOMMU_SUPPORT\n>>> +\tselect CEC_CORE if CEC_NOTIFIER\n>>>  \thelp\n>>>  \t  Choose this option if you have an NVIDIA Tegra SoC.\n>>>  \n>>> diff --git a/drivers/gpu/drm/tegra/drm.h b/drivers/gpu/drm/tegra/drm.h\n>>> index 6d6da01282f3..c0a18b60caf1 100644\n>>> --- a/drivers/gpu/drm/tegra/drm.h\n>>> +++ b/drivers/gpu/drm/tegra/drm.h\n>>> @@ -212,6 +212,8 @@ int tegra_dc_state_setup_clock(struct tegra_dc *dc,\n>>>  \t\t\t       struct clk *clk, unsigned long pclk,\n>>>  \t\t\t       unsigned int div);\n>>>  \n>>> +struct cec_notifier;\n>>> +\n>>>  struct tegra_output {\n>>>  \tstruct device_node *of_node;\n>>>  \tstruct device *dev;\n>>> @@ -219,6 +221,7 @@ struct tegra_output {\n>>>  \tstruct drm_panel *panel;\n>>>  \tstruct i2c_adapter *ddc;\n>>>  \tconst struct edid *edid;\n>>> +\tstruct cec_notifier *notifier;\n>>>  \tunsigned int hpd_irq;\n>>>  \tint hpd_gpio;\n>>>  \tenum of_gpio_flags hpd_gpio_flags;\n>>> diff --git a/drivers/gpu/drm/tegra/hdmi.c b/drivers/gpu/drm/tegra/hdmi.c\n>>> index cda0491ed6bf..fbf14e1efd0e 100644\n>>> --- a/drivers/gpu/drm/tegra/hdmi.c\n>>> +++ b/drivers/gpu/drm/tegra/hdmi.c\n>>> @@ -21,6 +21,8 @@\n>>>  \n>>>  #include <sound/hda_verbs.h>\n>>>  \n>>> +#include <media/cec-notifier.h>\n>>> +\n>>>  #include \"hdmi.h\"\n>>>  #include \"drm.h\"\n>>>  #include \"dc.h\"\n>>> @@ -1720,6 +1722,10 @@ static int tegra_hdmi_probe(struct platform_device *pdev)\n>>>  \t\treturn PTR_ERR(hdmi->vdd);\n>>>  \t}\n>>>  \n>>> +\thdmi->output.notifier = cec_notifier_get(&pdev->dev);\n>>> +\tif (hdmi->output.notifier == NULL)\n>>> +\t\treturn -ENOMEM;\n>>> +\n>>>  \thdmi->output.dev = &pdev->dev;\n>>>  \n>>>  \terr = tegra_output_probe(&hdmi->output);\n>>> @@ -1778,6 +1784,9 @@ static int tegra_hdmi_remove(struct platform_device *pdev)\n>>>  \n>>>  \ttegra_output_remove(&hdmi->output);\n>>>  \n>>> +\tif (hdmi->output.notifier)\n>>> +\t\tcec_notifier_put(hdmi->output.notifier);\n>>> +\n>>>  \treturn 0;\n>>>  }\n>>>  \n>>> diff --git a/drivers/gpu/drm/tegra/output.c b/drivers/gpu/drm/tegra/output.c\n>>> index 595d1ec3e02e..57c052521a44 100644\n>>> --- a/drivers/gpu/drm/tegra/output.c\n>>> +++ b/drivers/gpu/drm/tegra/output.c\n>>> @@ -11,6 +11,8 @@\n>>>  #include <drm/drm_panel.h>\n>>>  #include \"drm.h\"\n>>>  \n>>> +#include <media/cec-notifier.h>\n>>> +\n>>>  int tegra_output_connector_get_modes(struct drm_connector *connector)\n>>>  {\n>>>  \tstruct tegra_output *output = connector_to_output(connector);\n>>> @@ -33,6 +35,7 @@ int tegra_output_connector_get_modes(struct drm_connector *connector)\n>>>  \t\tedid = drm_get_edid(connector, output->ddc);\n>>>  \n>>>  \tdrm_mode_connector_update_edid_property(connector, edid);\n>>> +\tcec_notifier_set_phys_addr_from_edid(output->notifier, edid);\n>>\n>> I had to guard this with:\n>>\n>> \t#if IS_REACHABLE(CONFIG_CEC_CORE) && IS_ENABLED(CONFIG_CEC_NOTIFIER)\n>> \t...\n>> \t#endif\n>>\n>> to enable this driver to be built without CEC_NOTIFIER enabled. I see\n>> that there are stubs defined if the above is false, but for some reason\n>> they don't seem to be there for me either.\n> \n> Nevermind that. This was not actually failing. However, ...\n> \n>>>  \n>>>  \tif (edid) {\n>>>  \t\terr = drm_add_edid_modes(connector, edid);\n>>> @@ -68,6 +71,9 @@ tegra_output_connector_detect(struct drm_connector *connector, bool force)\n>>>  \t\t\tstatus = connector_status_connected;\n>>>  \t}\n>>>  \n>>> +\tif (status != connector_status_connected)\n>>> +\t\tcec_notifier_phys_addr_invalidate(output->notifier);\n> \n> This doesn't seem to exist in v4.14-rc1 which is the base for the\n> drm/tegra tree for v4.15. I see this function will be introduced in\n> v4.15 via the media tree.\n\nStrange. This was released in the 4.13 kernel, so you should really have it.\nIt compiles fine for me, both with the drm tegra driver built-in and as a\nmodule.\n\nThis makes no sense to me.\n\nRegards,\n\n\tHans\n\n> \n> How about if I replace this by:\n> \n> \tcec_notifier_set_phys(output->notifier, CEC_PHYS_ADDR_INVALID);\n> \n> for now and switch it over to the new function after v4.15-rc1? That way\n> we can avoid the extra dependency between the media and drm trees.\n--\nTo unsubscribe from this list: send the line \"unsubscribe devicetree\" in\nthe body of a message to majordomo@vger.kernel.org\nMore majordomo info at  http://vger.kernel.org/majordomo-info.html","headers":{"Return-Path":"<devicetree-owner@vger.kernel.org>","X-Original-To":"incoming-dt@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-dt@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=devicetree-owner@vger.kernel.org; receiver=<UNKNOWN>)","ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=cisco.com header.i=@cisco.com\n\theader.b=\"CeYWyGWc\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3yHqk86mp4z9t4c\n\tfor <incoming-dt@patchwork.ozlabs.org>;\n\tFri, 20 Oct 2017 00:37:52 +1100 (AEDT)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752219AbdJSNht (ORCPT\n\t<rfc822;incoming-dt@patchwork.ozlabs.org>);\n\tThu, 19 Oct 2017 09:37:49 -0400","from aer-iport-2.cisco.com ([173.38.203.52]:25709 \"EHLO\n\taer-iport-2.cisco.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1751360AbdJSNhq (ORCPT\n\t<rfc822; devicetree@vger.kernel.org>); Thu, 19 Oct 2017 09:37:46 -0400","from aer-iport-nat.cisco.com (HELO aer-core-3.cisco.com)\n\t([173.38.203.22])\n\tby aer-iport-2.cisco.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t19 Oct 2017 13:37:44 +0000","from [10.47.79.81] ([10.47.79.81]) (authenticated bits=0)\n\tby aer-core-3.cisco.com (8.14.5/8.14.5) with ESMTP id v9JDbh9A003907\n\t(version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO);\n\tThu, 19 Oct 2017 13:37:44 GMT"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple;\n\td=cisco.com; i=@cisco.com; l=5393; q=dns/txt; s=iport;\n\tt=1508420266; x=1509629866;\n\th=subject:to:cc:references:from:message-id:date:\n\tmime-version:in-reply-to:content-transfer-encoding;\n\tbh=HIOkn5PfRP+oCFtS/mMYLr8NiuLSqmBaegjsB4F46QM=;\n\tb=CeYWyGWcgXskkz8WQ1xQE+lulPGRWS/7a7Jl+1HkYhprAxbzJLvyCDDK\n\tlL1i1D8Pj6p5kd5Fbp6LKyxOhGRT/iZ5cxKJ+PL+dTDd0g9bjia6jyCql\n\tl39dsVOgMlhcE6xvcSVshHonOvP6znf7G5aRwU+3fYmdIRqE3CzkYdtrD 8=;","X-IronPort-AV":"E=Sophos;i=\"5.43,401,1503360000\"; d=\"scan'208\";a=\"655541629\"","Subject":"Re: [PATCHv4 4/4] drm/tegra: add cec-notifier support","To":"Thierry Reding <thierry.reding@gmail.com>,\n\tHans Verkuil <hverkuil@xs4all.nl>","Cc":"linux-media@vger.kernel.org, linux-tegra@vger.kernel.org,\n\tdevicetree@vger.kernel.org, dri-devel@lists.freedesktop.org,\n\tHans Verkuil <hans.verkuil@cisco.com>","References":"<20170911122952.33980-1-hverkuil@xs4all.nl>\n\t<20170911122952.33980-5-hverkuil@xs4all.nl>\n\t<20171019131716.GT9005@ulmo> <20171019133007.GU9005@ulmo>","From":"Hans Verkuil <hansverk@cisco.com>","Message-ID":"<7e1fcffd-76dc-c4f2-942c-b9872f73fff0@cisco.com>","Date":"Thu, 19 Oct 2017 15:37:43 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<20171019133007.GU9005@ulmo>","Content-Type":"text/plain; charset=windows-1252","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","X-Authenticated-User":"hansverk","Sender":"devicetree-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<devicetree.vger.kernel.org>","X-Mailing-List":"devicetree@vger.kernel.org"}},{"id":1790594,"web_url":"http://patchwork.ozlabs.org/comment/1790594/","msgid":"<20171019140135.GV9005@ulmo>","list_archive_url":null,"date":"2017-10-19T14:01:35","subject":"Re: [PATCHv4 4/4] drm/tegra: add cec-notifier support","submitter":{"id":26234,"url":"http://patchwork.ozlabs.org/api/people/26234/","name":"Thierry Reding","email":"thierry.reding@gmail.com"},"content":"On Thu, Oct 19, 2017 at 03:37:43PM +0200, Hans Verkuil wrote:\n> On 10/19/17 15:30, Thierry Reding wrote:\n> > On Thu, Oct 19, 2017 at 03:17:16PM +0200, Thierry Reding wrote:\n> >> On Mon, Sep 11, 2017 at 02:29:52PM +0200, Hans Verkuil wrote:\n> >>> From: Hans Verkuil <hans.verkuil@cisco.com>\n> >>>\n> >>> In order to support CEC the HDMI driver has to inform the CEC driver\n> >>> whenever the physical address changes. So when the EDID is read the\n> >>> CEC driver has to be informed and whenever the hotplug detect goes\n> >>> away.\n> >>>\n> >>> This is done through the cec-notifier framework.\n> >>>\n> >>> The link between the HDMI driver and the CEC driver is done through\n> >>> the hdmi_phandle in the tegra-cec node in the device tree.\n> >>>\n> >>> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>\n> >>> ---\n> >>>  drivers/gpu/drm/tegra/Kconfig  | 1 +\n> >>>  drivers/gpu/drm/tegra/drm.h    | 3 +++\n> >>>  drivers/gpu/drm/tegra/hdmi.c   | 9 +++++++++\n> >>>  drivers/gpu/drm/tegra/output.c | 6 ++++++\n> >>>  4 files changed, 19 insertions(+)\n> >>>\n> >>> diff --git a/drivers/gpu/drm/tegra/Kconfig b/drivers/gpu/drm/tegra/Kconfig\n> >>> index 2db29d67193d..c882918c2024 100644\n> >>> --- a/drivers/gpu/drm/tegra/Kconfig\n> >>> +++ b/drivers/gpu/drm/tegra/Kconfig\n> >>> @@ -8,6 +8,7 @@ config DRM_TEGRA\n> >>>  \tselect DRM_PANEL\n> >>>  \tselect TEGRA_HOST1X\n> >>>  \tselect IOMMU_IOVA if IOMMU_SUPPORT\n> >>> +\tselect CEC_CORE if CEC_NOTIFIER\n> >>>  \thelp\n> >>>  \t  Choose this option if you have an NVIDIA Tegra SoC.\n> >>>  \n> >>> diff --git a/drivers/gpu/drm/tegra/drm.h b/drivers/gpu/drm/tegra/drm.h\n> >>> index 6d6da01282f3..c0a18b60caf1 100644\n> >>> --- a/drivers/gpu/drm/tegra/drm.h\n> >>> +++ b/drivers/gpu/drm/tegra/drm.h\n> >>> @@ -212,6 +212,8 @@ int tegra_dc_state_setup_clock(struct tegra_dc *dc,\n> >>>  \t\t\t       struct clk *clk, unsigned long pclk,\n> >>>  \t\t\t       unsigned int div);\n> >>>  \n> >>> +struct cec_notifier;\n> >>> +\n> >>>  struct tegra_output {\n> >>>  \tstruct device_node *of_node;\n> >>>  \tstruct device *dev;\n> >>> @@ -219,6 +221,7 @@ struct tegra_output {\n> >>>  \tstruct drm_panel *panel;\n> >>>  \tstruct i2c_adapter *ddc;\n> >>>  \tconst struct edid *edid;\n> >>> +\tstruct cec_notifier *notifier;\n> >>>  \tunsigned int hpd_irq;\n> >>>  \tint hpd_gpio;\n> >>>  \tenum of_gpio_flags hpd_gpio_flags;\n> >>> diff --git a/drivers/gpu/drm/tegra/hdmi.c b/drivers/gpu/drm/tegra/hdmi.c\n> >>> index cda0491ed6bf..fbf14e1efd0e 100644\n> >>> --- a/drivers/gpu/drm/tegra/hdmi.c\n> >>> +++ b/drivers/gpu/drm/tegra/hdmi.c\n> >>> @@ -21,6 +21,8 @@\n> >>>  \n> >>>  #include <sound/hda_verbs.h>\n> >>>  \n> >>> +#include <media/cec-notifier.h>\n> >>> +\n> >>>  #include \"hdmi.h\"\n> >>>  #include \"drm.h\"\n> >>>  #include \"dc.h\"\n> >>> @@ -1720,6 +1722,10 @@ static int tegra_hdmi_probe(struct platform_device *pdev)\n> >>>  \t\treturn PTR_ERR(hdmi->vdd);\n> >>>  \t}\n> >>>  \n> >>> +\thdmi->output.notifier = cec_notifier_get(&pdev->dev);\n> >>> +\tif (hdmi->output.notifier == NULL)\n> >>> +\t\treturn -ENOMEM;\n> >>> +\n> >>>  \thdmi->output.dev = &pdev->dev;\n> >>>  \n> >>>  \terr = tegra_output_probe(&hdmi->output);\n> >>> @@ -1778,6 +1784,9 @@ static int tegra_hdmi_remove(struct platform_device *pdev)\n> >>>  \n> >>>  \ttegra_output_remove(&hdmi->output);\n> >>>  \n> >>> +\tif (hdmi->output.notifier)\n> >>> +\t\tcec_notifier_put(hdmi->output.notifier);\n> >>> +\n> >>>  \treturn 0;\n> >>>  }\n> >>>  \n> >>> diff --git a/drivers/gpu/drm/tegra/output.c b/drivers/gpu/drm/tegra/output.c\n> >>> index 595d1ec3e02e..57c052521a44 100644\n> >>> --- a/drivers/gpu/drm/tegra/output.c\n> >>> +++ b/drivers/gpu/drm/tegra/output.c\n> >>> @@ -11,6 +11,8 @@\n> >>>  #include <drm/drm_panel.h>\n> >>>  #include \"drm.h\"\n> >>>  \n> >>> +#include <media/cec-notifier.h>\n> >>> +\n> >>>  int tegra_output_connector_get_modes(struct drm_connector *connector)\n> >>>  {\n> >>>  \tstruct tegra_output *output = connector_to_output(connector);\n> >>> @@ -33,6 +35,7 @@ int tegra_output_connector_get_modes(struct drm_connector *connector)\n> >>>  \t\tedid = drm_get_edid(connector, output->ddc);\n> >>>  \n> >>>  \tdrm_mode_connector_update_edid_property(connector, edid);\n> >>> +\tcec_notifier_set_phys_addr_from_edid(output->notifier, edid);\n> >>\n> >> I had to guard this with:\n> >>\n> >> \t#if IS_REACHABLE(CONFIG_CEC_CORE) && IS_ENABLED(CONFIG_CEC_NOTIFIER)\n> >> \t...\n> >> \t#endif\n> >>\n> >> to enable this driver to be built without CEC_NOTIFIER enabled. I see\n> >> that there are stubs defined if the above is false, but for some reason\n> >> they don't seem to be there for me either.\n> > \n> > Nevermind that. This was not actually failing. However, ...\n> > \n> >>>  \n> >>>  \tif (edid) {\n> >>>  \t\terr = drm_add_edid_modes(connector, edid);\n> >>> @@ -68,6 +71,9 @@ tegra_output_connector_detect(struct drm_connector *connector, bool force)\n> >>>  \t\t\tstatus = connector_status_connected;\n> >>>  \t}\n> >>>  \n> >>> +\tif (status != connector_status_connected)\n> >>> +\t\tcec_notifier_phys_addr_invalidate(output->notifier);\n> > \n> > This doesn't seem to exist in v4.14-rc1 which is the base for the\n> > drm/tegra tree for v4.15. I see this function will be introduced in\n> > v4.15 via the media tree.\n> \n> Strange. This was released in the 4.13 kernel, so you should really have it.\n> It compiles fine for me, both with the drm tegra driver built-in and as a\n> module.\n> \n> This makes no sense to me.\n\nSigh... you're right. I had inadvertently rebased onto a v4.13-rc1 when\nbuild testing. Sorry for the noise, it's working perfectly fine on top\nof v4.14-rc1.\n\nThierry","headers":{"Return-Path":"<devicetree-owner@vger.kernel.org>","X-Original-To":"incoming-dt@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming-dt@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=devicetree-owner@vger.kernel.org; receiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"khnf4o0f\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3yHrFj0zJ4z9t2Z\n\tfor <incoming-dt@patchwork.ozlabs.org>;\n\tFri, 20 Oct 2017 01:01:45 +1100 (AEDT)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S932120AbdJSOBl (ORCPT <rfc822; incoming-dt@patchwork.ozlabs.org>);\n\tThu, 19 Oct 2017 10:01:41 -0400","from mail-qt0-f193.google.com ([209.85.216.193]:50743 \"EHLO\n\tmail-qt0-f193.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S932088AbdJSOBj (ORCPT\n\t<rfc822; devicetree@vger.kernel.org>); Thu, 19 Oct 2017 10:01:39 -0400","by mail-qt0-f193.google.com with SMTP id d9so7735614qtd.7;\n\tThu, 19 Oct 2017 07:01:39 -0700 (PDT)","from localhost\n\t(p200300E41BE4FD00CEAD5B94E1CFD280.dip0.t-ipconnect.de.\n\t[2003:e4:1be4:fd00:cead:5b94:e1cf:d280])\n\tby smtp.gmail.com with ESMTPSA id\n\ti12sm9272191qkh.83.2017.10.19.07.01.36\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tThu, 19 Oct 2017 07:01:37 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:in-reply-to:user-agent;\n\tbh=yLzQBtPrDMEUclBsk4OABM9T6BHscml94M8+jfHA1x0=;\n\tb=khnf4o0f8n0G9VoOhj+ulzP7L8rs6agIe0oEs3OAqcgvZLeZuQ7YLO/YwVGBlhurkE\n\tS1zQQn+B1oPsQMqveV5R67lglAxkz12IG57LfYsFg3wSOJVOO04S5VLdOpyzJwraIvio\n\tzJ7oOwc9cgSVa1//0vtam+f3bBOl+FKBthKA/kYXYaEmVUwkK1NB52NhKNcAdJw+KiJ8\n\tvWhsBRPJZIiADF1LSXFQ16uyyG2iy8DKlzruAdtuMpjB8NjBuFIWslxt9ZtqnVZDMpW5\n\tPCnndyC4QbjxdHc+jloTlj/nVjzUBN0efMRVCsUAJLhV7FV1KWjURH8nTnNiQpo9txmZ\n\tMUVw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:in-reply-to:user-agent;\n\tbh=yLzQBtPrDMEUclBsk4OABM9T6BHscml94M8+jfHA1x0=;\n\tb=Z3JsTB3g2WpXmsw9QzOJaivlPkeafwMo2+BL+tljeHmGoZuH41jXO67RZl1/kyIRN3\n\tkAJriaU2A1PPsxeiC+ykHMNlj71g2vgS2lIGlpOTsi7lx6zkd8RvgNE0aHIwQAf2leOH\n\tyj+/52p3iAUs13b3v6yp3ivUiSdBRvl4PbX6hQy1ZQQve3eyBmVCQN9WfbIKYxYb3YF/\n\tMWCtmTQ5miTuaR267GHZPgVBvzMgwdESmubocK+0NsOUfG3oYbk/rkqrB87D4LsosLOo\n\t/GP5a4rw7neIO6vImaNy79nkiLEdQbKe7hSJghE0ts/4QfEzvVCLdJA+pQ2g+h6Lcjsk\n\tI0pw==","X-Gm-Message-State":"AMCzsaXvF86wCA10EaJtz1WVMBK4cThwxAEQM3wi5y75btJBOW2Utt7V\n\tx6+TrC9FnlucuWX7fdqsAA1DDg==","X-Google-Smtp-Source":"ABhQp+TCqLxx8mUX/eF/R5YMkchm/HDPaItt73voTtPEwG2xHWruhO3DRz0w1l9S3ntdaIyVFjAomA==","X-Received":"by 10.200.27.221 with SMTP id m29mr2240531qtk.152.1508421698374; \n\tThu, 19 Oct 2017 07:01:38 -0700 (PDT)","Date":"Thu, 19 Oct 2017 16:01:35 +0200","From":"Thierry Reding <thierry.reding@gmail.com>","To":"Hans Verkuil <hansverk@cisco.com>","Cc":"Hans Verkuil <hverkuil@xs4all.nl>, linux-media@vger.kernel.org,\n\tlinux-tegra@vger.kernel.org, devicetree@vger.kernel.org,\n\tdri-devel@lists.freedesktop.org, Hans Verkuil <hans.verkuil@cisco.com>","Subject":"Re: [PATCHv4 4/4] drm/tegra: add cec-notifier support","Message-ID":"<20171019140135.GV9005@ulmo>","References":"<20170911122952.33980-1-hverkuil@xs4all.nl>\n\t<20170911122952.33980-5-hverkuil@xs4all.nl>\n\t<20171019131716.GT9005@ulmo> <20171019133007.GU9005@ulmo>\n\t<7e1fcffd-76dc-c4f2-942c-b9872f73fff0@cisco.com>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\"; boundary=\"CSNFvL6ilyiKL/Hs\"","Content-Disposition":"inline","In-Reply-To":"<7e1fcffd-76dc-c4f2-942c-b9872f73fff0@cisco.com>","User-Agent":"Mutt/1.9.1 (2017-09-22)","Sender":"devicetree-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<devicetree.vger.kernel.org>","X-Mailing-List":"devicetree@vger.kernel.org"}}]