From patchwork Wed Aug 14 10:44:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dariusz Marcinkiewicz X-Patchwork-Id: 11095309 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DF5EF1399 for ; Thu, 15 Aug 2019 08:37:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CF0832811A for ; Thu, 15 Aug 2019 08:37:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C29FF2884A; Thu, 15 Aug 2019 08:37:46 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, MAILING_LIST_MULTI,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 7001B2811A for ; Thu, 15 Aug 2019 08:37:46 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 571876E948; Thu, 15 Aug 2019 08:35:12 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qk1-x749.google.com (mail-qk1-x749.google.com [IPv6:2607:f8b0:4864:20::749]) by gabe.freedesktop.org (Postfix) with ESMTPS id D4E456E52C for ; Wed, 14 Aug 2019 10:45:31 +0000 (UTC) Received: by mail-qk1-x749.google.com with SMTP id d9so98891021qko.8 for ; Wed, 14 Aug 2019 03:45:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=GWyXBGwmHFcGXlg8sYWmi9ISwiX/TjDTxXNJrsxIlo0=; b=F63jB+kGuJ2qPBl09aiYAZNK6jCU+LSGPgQfVbRJnqTZNSijhQEVztSD7/tkyx+V+7 Izoknt8L3v23mx7Hsu645tKnlgYgIN/3lf7a3CYlzan7dbAhXRJ/5zRaoQYCVeoUHwDW 4Q5idrULHpdk9avtex2497zHtg2W/D5E2XjRL7IAXTuf8/8jI0OBJVmHgZL1/nk+OqdQ gZKcbWAOnnST4TrTWqtz8f1+3JahCNsM8QpCRTebvO/9qD2osPTOQxyeYRlGW22OLrfA 5yZdbqfvL9x3gxR4ZuamWTiz53hnWddcWDCBqDCE0PJhIUBOu2gQznmXTtXNaVDkftr9 CQTQ== X-Gm-Message-State: APjAAAX9ucuCw8625h2z2FBgxgIYxC5SkLoFyM97hlTMCeTwFaDd4F4w UiRC69KshNtkgVPCQhPogaBIqlQamAfB5wdyMSn4zUt8VxpTqS1jshTe6kKEigUDFOHjbFYGXjz /IG/xw0o3rAmviObbGpqsj3DzqHJnyDXCNKJmq2zzcpOI2dJpFvOwho3/8j9GXIXeRq14cngwtA == X-Google-Smtp-Source: APXvYqwhM4JMovHg2xzCJqqYJ3hsrqpakcRk8IC6SFMlsdE9qbu+1Sj05yHDBXOw9hQhCX71VwS62n5KfcM= X-Received: by 2002:ac8:748a:: with SMTP id v10mr16346695qtq.386.1565779530315; Wed, 14 Aug 2019 03:45:30 -0700 (PDT) Date: Wed, 14 Aug 2019 12:44:58 +0200 Message-Id: <20190814104520.6001-1-darekm@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.23.0.rc1.153.gdeed80330f-goog Subject: [PATCH v7 0/9] drm: cec: convert DRM drivers to the new notifier API From: Dariusz Marcinkiewicz To: dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org, hverkuil-cisco@xs4all.nl X-Mailman-Approved-At: Thu, 15 Aug 2019 08:34:55 +0000 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc; bh=GWyXBGwmHFcGXlg8sYWmi9ISwiX/TjDTxXNJrsxIlo0=; b=SO9w2qWfA9s7es8tmXD3wqbpTBgbgE1DHH1ERM7v7ptLx8iAJ95y8N4Tw+xRfTgVDo 13xnwEMU6xzG5TpnrwEkbvb8IB4VVAMk6MolT2ZOkf2TYbkpgela2WK1udMqSYuSSak5 Q8LdwxwSdNmbsCfPqW/1A50L/ApA7o7dCxHQL6Y2ilUQe/pD/9Nn91c3LpVJIKbuVG3f htMPgcJTD+HpBw3QVSvs7B1iIa/DvtlWekME6zM0+MAhwABxQrewkKFJVJq3adx9qDVe C1f+Ddir0Bz1vfsh4GwublcxERGy6vsW5i3k2OyP6w/YcY/Yuy9icYHfcvFqq2wGVRrR +BXg== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kate Stewart , Neil Armstrong , Daniel Vetter , Hans Verkuil , Dhinakaran Pandiyan , Sam Ravnborg , linux-samsung-soc@vger.kernel.org, David Francis , amd-gfx@lists.freedesktop.org, Leo Li , "Jerry \(Fangzhi\) Zuo" , linux-arm-kernel@lists.infradead.org, nouveau@lists.freedesktop.org, Jonas Karlman , Jani Nikula , intel-gfx@lists.freedesktop.org, Russell King , Sean Paul , Rodrigo Vivi , linux-tegra@vger.kernel.org, Thomas Gleixner , Allison Randal , Thomas Lim , Jernej Skrabec , Greg Kroah-Hartman , Douglas Anderson , linux-kernel@vger.kernel.org, Manasi Navare , Alex Deucher , Colin Ian King , Dariusz Marcinkiewicz , Enrico Weigelt , Laurent Pinchart Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP This series updates DRM drivers to use new CEC notifier API. Changes since v6: Made CEC notifiers' registration and de-registration symmetric in tda998x and dw-hdmi drivers. Also, accidentally dropped one patch in v6 (change to drm_dp_cec), brought it back now. Changes since v5: Fixed a warning about a missing comment for a new member of drm_dp_aux_cec struct. Sending to a wider audience, including maintainers of respective drivers. Changes since v4: Addressing review comments. Changes since v3: Updated adapter flags in dw-hdmi-cec. Changes since v2: Include all DRM patches from "cec: improve notifier support, add connector info connector info" series. Changes since v1: Those patches delay creation of notifiers until respective connectors are constructed. It seems that those patches, for a couple of drivers, by adding the delay, introduce a race between notifiers' creation and the IRQs handling threads - at least I don't see anything obvious in there that would explicitly forbid such races to occur. v2 adds a write barrier to make sure IRQ threads see the notifier once it is created (replacing the WRITE_ONCE I put in v1). The best thing to do here, I believe, would be not to have any synchronization and make sure that an IRQ only gets enabled after the notifier is created. Dariusz Marcinkiewicz (9): drm_dp_cec: add connector info support. drm/i915/intel_hdmi: use cec_notifier_conn_(un)register dw-hdmi-cec: use cec_notifier_cec_adap_(un)register tda9950: use cec_notifier_cec_adap_(un)register drm: tda998x: use cec_notifier_conn_(un)register drm: sti: use cec_notifier_conn_(un)register drm: tegra: use cec_notifier_conn_(un)register drm: dw-hdmi: use cec_notifier_conn_(un)register drm: exynos: exynos_hdmi: use cec_notifier_conn_(un)register .../display/amdgpu_dm/amdgpu_dm_mst_types.c | 2 +- drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c | 13 +++--- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 46 +++++++++++++------ drivers/gpu/drm/drm_dp_cec.c | 25 ++++++---- drivers/gpu/drm/exynos/exynos_hdmi.c | 31 +++++++------ drivers/gpu/drm/i2c/tda9950.c | 12 ++--- drivers/gpu/drm/i2c/tda998x_drv.c | 36 ++++++++++----- drivers/gpu/drm/i915/display/intel_dp.c | 4 +- drivers/gpu/drm/i915/display/intel_hdmi.c | 13 ++++-- drivers/gpu/drm/nouveau/nouveau_connector.c | 3 +- drivers/gpu/drm/sti/sti_hdmi.c | 19 +++++--- drivers/gpu/drm/tegra/output.c | 28 ++++++++--- include/drm/drm_dp_helper.h | 17 ++++--- 13 files changed, 155 insertions(+), 94 deletions(-)