From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EE718C433EB for ; Tue, 28 Jul 2020 13:25:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CF120206F5 for ; Tue, 28 Jul 2020 13:25:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="IkEQ1WD+" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730136AbgG1NZU (ORCPT ); Tue, 28 Jul 2020 09:25:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729991AbgG1NZU (ORCPT ); Tue, 28 Jul 2020 09:25:20 -0400 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B86F6C061794 for ; Tue, 28 Jul 2020 06:25:19 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id b6so18281703wrs.11 for ; Tue, 28 Jul 2020 06:25:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BnkqZuh++8Nyz7qDB61TIgg/e9h5HC3HmU88l0fPREc=; b=IkEQ1WD+oaOYJMt5V3vCBqnKqZKVOHp8IcfCmTzu+QgfrApn64nxDuQpGAigx7KDcM LLcdPwmr1jSXVhKAatNz03GzLs/6Vlh39NC/O6LMa3vzgjAobOFGkZUu6uHjRP7JWYCo MCkZ0nbEhKkbR82cTawPX+gM0Pk10AhqCeaKm/m/KXCgWpZh2h2Kej6t/7FaDi+Cm8q/ lPZwDiS7RXO/UymIExdM6ThIecB8y8005n0nmGVDr9uXishRVOb3iTtgJ2AD/nyJL9hy XhKOeGQ71pP32Y5y8Q5rEIQdYxSfzCReD1hBJj+xRGf+EPGkpsaDW52Pnq0Lbfr1sNzl lOdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=BnkqZuh++8Nyz7qDB61TIgg/e9h5HC3HmU88l0fPREc=; b=kkWxNOjrwtaoV5q0S9yR/HBvbcOe0/UZt5f6HH2pnTtnlOQ/HN9GuxL+Hxcp3c3MT8 1CTNhfVbQ+Wl16HzebK5HX0O9LhxZ6M5fKN2ZFehEvaHRlMPVWcAgz/OtrD2uAnP5WYF AfLnP6y3Uzbd3n3RGt8mtA0kwFKr/jeemECQ5Luh2QCkVNuVVVs21vbVbbPNG0bX9NqH smccxcbJm061SmFGfSBdSK0+k8Je9AHl2I5NfpjaAkJH7oX3w52vnxpE2ufaF9ykL3ss fO/O1dR1yLzUvlTK3RCjWMKhjP+28vi1j/8LwfDYabyf4L0EOEWAQF1KYcjdbOrV0RmO QZcw== X-Gm-Message-State: AOAM533Z1ILv9jd63qlEtRgBCdXtRgi/drGjxNqjmnb8Zp2FUs67fadE NtGQPeDIHKCh7W23qnS5LSjqqIxD4Gc0GB7qAc+rUQ== X-Google-Smtp-Source: ABdhPJzKZMW4yeHYoMhjbyXIdKK5EP7J/ukIUn/pmswXVcXcrqcKNtmYRDkd8iXjV/fJdX3O+1cYpgFt/HQXuTMKnNc= X-Received: by 2002:a5d:6681:: with SMTP id l1mr23866783wru.47.1595942718473; Tue, 28 Jul 2020 06:25:18 -0700 (PDT) MIME-Version: 1.0 References: <73684b1e4872a1113f6c3bb5404bc6b4a20f130d.1594230107.git-series.maxime@cerno.tech> In-Reply-To: <73684b1e4872a1113f6c3bb5404bc6b4a20f130d.1594230107.git-series.maxime@cerno.tech> From: Dave Stevenson Date: Tue, 28 Jul 2020 14:25:02 +0100 Message-ID: Subject: Re: [PATCH v4 59/78] drm/vc4: hdmi: Add CEC support flag To: Maxime Ripard Cc: Nicolas Saenz Julienne , Eric Anholt , DRI Development , linux-rpi-kernel@lists.infradead.org, bcm-kernel-feedback-list@broadcom.com, linux-arm-kernel@lists.infradead.org, LKML , Tim Gover , Phil Elwell Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Maxime On Wed, 8 Jul 2020 at 18:43, Maxime Ripard wrote: > > Similarly to the audio support, CEC support is not there yet for the > BCM2711, so let's skip entirely the CEC initialization through a variant > flag. CEC is sorted now, but it's easier & cleaner to keep this patch and add a new patchset that enables CEC at a later date. > Signed-off-by: Maxime Ripard Reviewed-by: Dave Stevenson > --- > drivers/gpu/drm/vc4/vc4_hdmi.c | 4 ++++ > drivers/gpu/drm/vc4/vc4_hdmi.h | 3 +++ > 2 files changed, 7 insertions(+) > > diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c > index 8cd08b541c14..86e21de6c578 100644 > --- a/drivers/gpu/drm/vc4/vc4_hdmi.c > +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c > @@ -1179,6 +1179,9 @@ static int vc4_hdmi_cec_init(struct vc4_hdmi *vc4_hdmi) > u32 value; > int ret; > > + if (!vc4_hdmi->variant->cec_available) > + return 0; > + > vc4_hdmi->cec_adap = cec_allocate_adapter(&vc4_hdmi_cec_adap_ops, > vc4_hdmi, "vc4", > CEC_CAP_DEFAULTS | > @@ -1477,6 +1480,7 @@ static int vc4_hdmi_dev_remove(struct platform_device *pdev) > static const struct vc4_hdmi_variant bcm2835_variant = { > .encoder_type = VC4_ENCODER_TYPE_HDMI0, > .debugfs_name = "hdmi_regs", > + .cec_available = true, > .registers = vc4_hdmi_fields, > .num_registers = ARRAY_SIZE(vc4_hdmi_fields), > > diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.h b/drivers/gpu/drm/vc4/vc4_hdmi.h > index 794216f3228d..3f07aebe89f1 100644 > --- a/drivers/gpu/drm/vc4/vc4_hdmi.h > +++ b/drivers/gpu/drm/vc4/vc4_hdmi.h > @@ -33,6 +33,9 @@ struct vc4_hdmi_variant { > /* Filename to expose the registers in debugfs */ > const char *debugfs_name; > > + /* Set to true when the CEC support is available */ > + bool cec_available; > + > /* List of the registers available on that variant */ > const struct vc4_hdmi_register *registers; > > -- > git-series 0.9.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9ED66C433E5 for ; Tue, 28 Jul 2020 13:26:40 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6BFC4206D7 for ; Tue, 28 Jul 2020 13:26:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="RPXvU93P"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="IkEQ1WD+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6BFC4206D7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=raspberrypi.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=et6U5W+iL6YjXcC4m301bGDmmdsSEMvGhNIVC+4lMuk=; b=RPXvU93Pj1bQn2NSQ8y2t0QG2 8kvPnNteLG5PNNulaRk4DLLVKcCEheTJk0Ial4Ex5OUY1azW5L6QOrRZapsO1ENVMxgDXpuiHvedW IucpPFn3Ou7qwr9JO9yTK/HnHAB6w3oPjblydwSSa+EegLqjnWPjUYv9OFgaergpHwW8uY0XzlGdn gfYfFHplmv4e9kv1RBdjr1QWgA6E//U/eiOn7qXIv+IO67Su86RnPZ1rCIl8PppHYZ9iy0KW6tFnc /L5NZX7uCBVbAvMmN2IM3TnpsANrKcHzNSBuPKLvKZD8FkGL5SreVKuUQ362R1SzNNYkC0bNHYQC0 j0Scy3iQA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k0Pbe-0007X2-0w; Tue, 28 Jul 2020 13:25:22 +0000 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k0Pbb-0007W6-Ja for linux-arm-kernel@lists.infradead.org; Tue, 28 Jul 2020 13:25:20 +0000 Received: by mail-wr1-x441.google.com with SMTP id z18so14728118wrm.12 for ; Tue, 28 Jul 2020 06:25:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BnkqZuh++8Nyz7qDB61TIgg/e9h5HC3HmU88l0fPREc=; b=IkEQ1WD+oaOYJMt5V3vCBqnKqZKVOHp8IcfCmTzu+QgfrApn64nxDuQpGAigx7KDcM LLcdPwmr1jSXVhKAatNz03GzLs/6Vlh39NC/O6LMa3vzgjAobOFGkZUu6uHjRP7JWYCo MCkZ0nbEhKkbR82cTawPX+gM0Pk10AhqCeaKm/m/KXCgWpZh2h2Kej6t/7FaDi+Cm8q/ lPZwDiS7RXO/UymIExdM6ThIecB8y8005n0nmGVDr9uXishRVOb3iTtgJ2AD/nyJL9hy XhKOeGQ71pP32Y5y8Q5rEIQdYxSfzCReD1hBJj+xRGf+EPGkpsaDW52Pnq0Lbfr1sNzl lOdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=BnkqZuh++8Nyz7qDB61TIgg/e9h5HC3HmU88l0fPREc=; b=ZytewIyohJGTGz17D0KMRUCfzLMRBPjV8tfo6+P+/gbM4KkIl0ZjoRQWjv1E1Vm2fY /4SN0+uPM3vbaeB1mGXqsaBE8BDOjdstvVzrwJMQb0k+qahp1FIJO8msmfZxZM8jfgK7 Kzd7I2orXqZIBjpmVDkspCcbf3AQa7/BujADUvG2POGFQfGeEcVmg14hqsYzpzWaomib SFr+zVcqyyqeeCoiYoeU3t2XNlKerV4QMGVEL52eAUqL2Lspuj10I8yCGPwt0nHaIN61 e6G3dxhmoyqjSlph4Z31MpxHEchong3dHiRPCEiC32F1KxFhwY6ha3oK5uwJOxNx9VDr dKfg== X-Gm-Message-State: AOAM533Ltd15OKrPW4keuhcFAbL3pxDApNKQ/uG9EOMobmKB39MBlNcp L2qD2iuXoFxyF84IRiZlh7Z0XS6BrmxTm5rsDi/vkQ== X-Google-Smtp-Source: ABdhPJzKZMW4yeHYoMhjbyXIdKK5EP7J/ukIUn/pmswXVcXcrqcKNtmYRDkd8iXjV/fJdX3O+1cYpgFt/HQXuTMKnNc= X-Received: by 2002:a5d:6681:: with SMTP id l1mr23866783wru.47.1595942718473; Tue, 28 Jul 2020 06:25:18 -0700 (PDT) MIME-Version: 1.0 References: <73684b1e4872a1113f6c3bb5404bc6b4a20f130d.1594230107.git-series.maxime@cerno.tech> In-Reply-To: <73684b1e4872a1113f6c3bb5404bc6b4a20f130d.1594230107.git-series.maxime@cerno.tech> From: Dave Stevenson Date: Tue, 28 Jul 2020 14:25:02 +0100 Message-ID: Subject: Re: [PATCH v4 59/78] drm/vc4: hdmi: Add CEC support flag To: Maxime Ripard X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200728_092519_667299_CD7B4B85 X-CRM114-Status: GOOD ( 21.02 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tim Gover , LKML , DRI Development , Eric Anholt , bcm-kernel-feedback-list@broadcom.com, Nicolas Saenz Julienne , Phil Elwell , linux-arm-kernel@lists.infradead.org, linux-rpi-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Maxime On Wed, 8 Jul 2020 at 18:43, Maxime Ripard wrote: > > Similarly to the audio support, CEC support is not there yet for the > BCM2711, so let's skip entirely the CEC initialization through a variant > flag. CEC is sorted now, but it's easier & cleaner to keep this patch and add a new patchset that enables CEC at a later date. > Signed-off-by: Maxime Ripard Reviewed-by: Dave Stevenson > --- > drivers/gpu/drm/vc4/vc4_hdmi.c | 4 ++++ > drivers/gpu/drm/vc4/vc4_hdmi.h | 3 +++ > 2 files changed, 7 insertions(+) > > diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c > index 8cd08b541c14..86e21de6c578 100644 > --- a/drivers/gpu/drm/vc4/vc4_hdmi.c > +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c > @@ -1179,6 +1179,9 @@ static int vc4_hdmi_cec_init(struct vc4_hdmi *vc4_hdmi) > u32 value; > int ret; > > + if (!vc4_hdmi->variant->cec_available) > + return 0; > + > vc4_hdmi->cec_adap = cec_allocate_adapter(&vc4_hdmi_cec_adap_ops, > vc4_hdmi, "vc4", > CEC_CAP_DEFAULTS | > @@ -1477,6 +1480,7 @@ static int vc4_hdmi_dev_remove(struct platform_device *pdev) > static const struct vc4_hdmi_variant bcm2835_variant = { > .encoder_type = VC4_ENCODER_TYPE_HDMI0, > .debugfs_name = "hdmi_regs", > + .cec_available = true, > .registers = vc4_hdmi_fields, > .num_registers = ARRAY_SIZE(vc4_hdmi_fields), > > diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.h b/drivers/gpu/drm/vc4/vc4_hdmi.h > index 794216f3228d..3f07aebe89f1 100644 > --- a/drivers/gpu/drm/vc4/vc4_hdmi.h > +++ b/drivers/gpu/drm/vc4/vc4_hdmi.h > @@ -33,6 +33,9 @@ struct vc4_hdmi_variant { > /* Filename to expose the registers in debugfs */ > const char *debugfs_name; > > + /* Set to true when the CEC support is available */ > + bool cec_available; > + > /* List of the registers available on that variant */ > const struct vc4_hdmi_register *registers; > > -- > git-series 0.9.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 95D77C433DF for ; Tue, 28 Jul 2020 13:25:21 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 671A8206D7 for ; Tue, 28 Jul 2020 13:25:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="IkEQ1WD+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 671A8206D7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=raspberrypi.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E42AD889BE; Tue, 28 Jul 2020 13:25:20 +0000 (UTC) Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by gabe.freedesktop.org (Postfix) with ESMTPS id D8E28889BE for ; Tue, 28 Jul 2020 13:25:19 +0000 (UTC) Received: by mail-wr1-x443.google.com with SMTP id f18so18300506wrs.0 for ; Tue, 28 Jul 2020 06:25:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BnkqZuh++8Nyz7qDB61TIgg/e9h5HC3HmU88l0fPREc=; b=IkEQ1WD+oaOYJMt5V3vCBqnKqZKVOHp8IcfCmTzu+QgfrApn64nxDuQpGAigx7KDcM LLcdPwmr1jSXVhKAatNz03GzLs/6Vlh39NC/O6LMa3vzgjAobOFGkZUu6uHjRP7JWYCo MCkZ0nbEhKkbR82cTawPX+gM0Pk10AhqCeaKm/m/KXCgWpZh2h2Kej6t/7FaDi+Cm8q/ lPZwDiS7RXO/UymIExdM6ThIecB8y8005n0nmGVDr9uXishRVOb3iTtgJ2AD/nyJL9hy XhKOeGQ71pP32Y5y8Q5rEIQdYxSfzCReD1hBJj+xRGf+EPGkpsaDW52Pnq0Lbfr1sNzl lOdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=BnkqZuh++8Nyz7qDB61TIgg/e9h5HC3HmU88l0fPREc=; b=hVQFNIfn8HgJS1hEkXjUjVeMTMP+F4NsbPkAklNlavIz5XmQYVrsxRzNKexZn3em9P wfQVH9+fRLMO92yEMphAhYqSQoP01wb6o6gYIJrm3bMoGx9Ugut1mOq+gQSzpBWyvRyc QEMDB3AcLTO/QTlCsrMZupnkipm4jLDpSP3yOXPfu4dJ+KosbTiDuRLf5+oRt/aqSq4a wZ9fZbgZHwUK/y7uVAnREqHgLhnZmWGyZ+Aw8RLm0HbXbmOUe6J3t+vnoy2zNcospJql IXEhGi92hAXCyw3Mklu0ZBjCyC2KH7HT55ACIOCXZxekiz1Co5LM7/MeXvzmQX1jxpFj j3Qw== X-Gm-Message-State: AOAM5315pqlXWhwWy5zL77R6V7W3eK9PFUdLpGOr7Rh0fbO2xf6a1dm9 a8mdHnIHLpx7/iP0VxgdJ1lbRvI8DvAdpQxRyrH/nw== X-Google-Smtp-Source: ABdhPJzKZMW4yeHYoMhjbyXIdKK5EP7J/ukIUn/pmswXVcXcrqcKNtmYRDkd8iXjV/fJdX3O+1cYpgFt/HQXuTMKnNc= X-Received: by 2002:a5d:6681:: with SMTP id l1mr23866783wru.47.1595942718473; Tue, 28 Jul 2020 06:25:18 -0700 (PDT) MIME-Version: 1.0 References: <73684b1e4872a1113f6c3bb5404bc6b4a20f130d.1594230107.git-series.maxime@cerno.tech> In-Reply-To: <73684b1e4872a1113f6c3bb5404bc6b4a20f130d.1594230107.git-series.maxime@cerno.tech> From: Dave Stevenson Date: Tue, 28 Jul 2020 14:25:02 +0100 Message-ID: Subject: Re: [PATCH v4 59/78] drm/vc4: hdmi: Add CEC support flag To: Maxime Ripard X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tim Gover , LKML , DRI Development , bcm-kernel-feedback-list@broadcom.com, Nicolas Saenz Julienne , Phil Elwell , linux-arm-kernel@lists.infradead.org, linux-rpi-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Maxime On Wed, 8 Jul 2020 at 18:43, Maxime Ripard wrote: > > Similarly to the audio support, CEC support is not there yet for the > BCM2711, so let's skip entirely the CEC initialization through a variant > flag. CEC is sorted now, but it's easier & cleaner to keep this patch and add a new patchset that enables CEC at a later date. > Signed-off-by: Maxime Ripard Reviewed-by: Dave Stevenson > --- > drivers/gpu/drm/vc4/vc4_hdmi.c | 4 ++++ > drivers/gpu/drm/vc4/vc4_hdmi.h | 3 +++ > 2 files changed, 7 insertions(+) > > diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c > index 8cd08b541c14..86e21de6c578 100644 > --- a/drivers/gpu/drm/vc4/vc4_hdmi.c > +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c > @@ -1179,6 +1179,9 @@ static int vc4_hdmi_cec_init(struct vc4_hdmi *vc4_hdmi) > u32 value; > int ret; > > + if (!vc4_hdmi->variant->cec_available) > + return 0; > + > vc4_hdmi->cec_adap = cec_allocate_adapter(&vc4_hdmi_cec_adap_ops, > vc4_hdmi, "vc4", > CEC_CAP_DEFAULTS | > @@ -1477,6 +1480,7 @@ static int vc4_hdmi_dev_remove(struct platform_device *pdev) > static const struct vc4_hdmi_variant bcm2835_variant = { > .encoder_type = VC4_ENCODER_TYPE_HDMI0, > .debugfs_name = "hdmi_regs", > + .cec_available = true, > .registers = vc4_hdmi_fields, > .num_registers = ARRAY_SIZE(vc4_hdmi_fields), > > diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.h b/drivers/gpu/drm/vc4/vc4_hdmi.h > index 794216f3228d..3f07aebe89f1 100644 > --- a/drivers/gpu/drm/vc4/vc4_hdmi.h > +++ b/drivers/gpu/drm/vc4/vc4_hdmi.h > @@ -33,6 +33,9 @@ struct vc4_hdmi_variant { > /* Filename to expose the registers in debugfs */ > const char *debugfs_name; > > + /* Set to true when the CEC support is available */ > + bool cec_available; > + > /* List of the registers available on that variant */ > const struct vc4_hdmi_register *registers; > > -- > git-series 0.9.1 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel