From patchwork Tue Jul 11 21:06:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 9835483 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9E76760393 for ; Tue, 11 Jul 2017 21:06:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 902C32844C for ; Tue, 11 Jul 2017 21:06:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 84A2E2850E; Tue, 11 Jul 2017 21:06:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 046E3284FF for ; Tue, 11 Jul 2017 21:06:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 27FF06E041; Tue, 11 Jul 2017 21:06:58 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from lb2-smtp-cloud3.xs4all.net (lb2-smtp-cloud3.xs4all.net [194.109.24.26]) by gabe.freedesktop.org (Postfix) with ESMTPS id CB9516E041 for ; Tue, 11 Jul 2017 21:06:56 +0000 (UTC) Received: from [192.168.1.10] ([80.101.105.217]) by smtp-cloud3.xs4all.net with ESMTP id jZ6s1v00K4hSry801Z6vPr; Tue, 11 Jul 2017 23:06:55 +0200 Subject: Re: [PATCH 00/11] drm/sun4i: add CEC support To: Maxime Ripard References: <20170711063044.29849-1-hverkuil@xs4all.nl> <20170711203917.gcpod5gcsy6zbkyx@flea> From: Hans Verkuil Message-ID: <33287848-2050-e36a-05a4-f27487358d5e@xs4all.nl> Date: Tue, 11 Jul 2017 23:06:52 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <20170711203917.gcpod5gcsy6zbkyx@flea> Cc: dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP On 11/07/17 22:39, Maxime Ripard wrote: > On Tue, Jul 11, 2017 at 08:30:33AM +0200, Hans Verkuil wrote: >> From: Hans Verkuil >> >> This patch series adds CEC support for the sun4i HDMI controller. >> >> The CEC hardware support for the A10 is very low-level as it just >> controls the CEC pin. Since I also wanted to support GPIO-based CEC >> hardware most of this patch series is in the CEC framework to >> add a generic low-level CEC pin framework. It is only the final patch >> that adds the sun4i support. >> >> This patch series first makes some small changes in the CEC framework >> (patches 1-4) to prepare for this CEC pin support. >> >> Patch 5-7 adds the new API elements and documents it. Patch 6 reworks >> the CEC core event handling. >> >> Patch 8 adds pin monitoring support (allows userspace to see all >> CEC pin transitions as they happen). >> >> Patch 9 adds the core cec-pin implementation that translates low-level >> pin transitions into valid CEC messages. Basically this does what any >> SoC with a proper CEC hardware implementation does. >> >> Patch 10 documents the cec-pin kAPI (and also the cec-notifier kAPI >> which was missing). >> >> Finally patch 11 adds the actual sun4i_hdmi CEC implementation. >> >> I tested this on my cubieboard. There were no errors at all >> after 126264 calls of 'cec-ctl --give-device-vendor-id' while at the >> same time running a 'make -j4' of the v4l-utils git repository and >> doing a continuous scp to create network traffic. >> >> This patch series is based on top of the mainline kernel as of >> yesterday (so with all the sun4i and cec patches for 4.13 merged). > > For the whole serie: > Reviewed-by: Maxime Ripard > >> Maxime, patches 1-10 will go through the media subsystem. How do you >> want to handle the final patch? It can either go through the media >> subsystem as well, or you can sit on it and handle this yourself during >> the 4.14 merge window. Another option is to separate the Kconfig change >> into its own patch. That way you can merge the code changes and only >> have to handle the Kconfig patch as a final change during the merge >> window. > > We'll probably have a number of reworks for 4.14, so it would be > better if I merged it. > > However, I guess if we just switch to a depends on CEC_PIN instead of > a select, everything would just work even if we merge your patches in > a separate tree, right? This small patch will do it: Unfortunately you need to change the header as well since cec-pin.h doesn't exist without the cec patches. It might be better to And once the cec patch series and the sun4i_hdmi patch is merged the patch above can be applied with -R and all will work fine. This seems a sensible way forward. Regards, Hans Acked-by: Hans Verkuil diff --git a/drivers/gpu/drm/sun4i/Kconfig b/drivers/gpu/drm/sun4i/Kconfig index e884d265c0b3..ebad80aefc87 100644 --- a/drivers/gpu/drm/sun4i/Kconfig +++ b/drivers/gpu/drm/sun4i/Kconfig @@ -25,7 +25,7 @@ config DRM_SUN4I_HDMI_CEC bool "Allwinner A10 HDMI CEC Support" depends on DRM_SUN4I_HDMI select CEC_CORE - select CEC_PIN + depends on CEC_PIN help Choose this option if you have an Allwinner SoC with an HDMI controller and want to use CEC. diff --git a/drivers/gpu/drm/sun4i/sun4i_hdmi.h b/drivers/gpu/drm/sun4i/sun4i_hdmi.h index 8263de225b36..82bc6923b90f 100644 --- a/drivers/gpu/drm/sun4i/sun4i_hdmi.h +++ b/drivers/gpu/drm/sun4i/sun4i_hdmi.h @@ -15,7 +15,7 @@ #include #include -#include +#include #define SUN4I_HDMI_CTRL_REG 0x004 #define SUN4I_HDMI_CTRL_ENABLE BIT(31)