From patchwork Fri Jul 3 19:24:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Ravnborg X-Patchwork-Id: 11642759 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CDDAC13B6 for ; Fri, 3 Jul 2020 19:24:52 +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 ACBD420884 for ; Fri, 3 Jul 2020 19:24:52 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="md0jMJrG" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org ACBD420884 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ravnborg.org 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 A28246EBBB; Fri, 3 Jul 2020 19:24:40 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3AFE36EBBB for ; Fri, 3 Jul 2020 19:24:39 +0000 (UTC) Received: by mail-lj1-x241.google.com with SMTP id t25so33590873lji.12 for ; Fri, 03 Jul 2020 12:24:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pG4sBLdV8sXhjJG9670kJDTdMvHOUXkksq9OtkoN0aw=; b=md0jMJrGaTV3NEIPKpYifFnT8UG0j1dEpQ/Y0JsrpM0TIYfVaJvT0ll7PxI90kCfcM GYAP8L8mnIka/CPcl4gu6uaM48kBDEmVWkXlsRFrutyp7MwvlaxG7jgwI3zbhqIr4c89 4JTswKC9KpEEZ3u5rxgCzuVQW5dXimIeo9KhtvLMamEgNxFGHQqth+kxb9v3AtM5D6F+ mWSAuAGbd0g8zb+M8V5fD8YqQUUNtl2DS+A83XCFKqDQUVr3lpnGvBLDTKIhBbWGTLgx Q2KYzJoX7/Wz7hIcUvtbCpXdQU4w3nCdHeeNbBh+oCr8LEZQbm8g/OADjHmmwVnnU+BO xBJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=pG4sBLdV8sXhjJG9670kJDTdMvHOUXkksq9OtkoN0aw=; b=FF2VgiQry87hXNBDtQyyw2fYGNKoZOLCwV+Dt3eDqcES0JBLucrU5DhSfH73EwTiIG ZFoJX0DNP6UkPpC+01Ggnly2RtnwLpHnm6v4C0qSFHldl83fwwCoX1xq7MSTopNqcVNC aW5FRpkMmmGJG8gxMUrQbHCdWWCPtu72uXWCC4jlPxuKa1Hda9FCmfzFIawSuBlOB7Tu E0TImsYqNxlI/gU7r8ajo1y9Nq3vb8oFHCfjsaxR/Q9DdhpXiubcM7F9pG8bEdSNlkQb hzYAm3T9OE/hd7BfWa/+rR85DooB8d62EcvluDDrztGFXEGGSxHE81FrqQX3M5KehVln SArQ== X-Gm-Message-State: AOAM532LUHkszykmdTI4ENygA384r/PglmhHjTV4Oufad/gYaOGpHNwB USlYeOxJ4Rusl4Q1Y9x1ipVkYZBkGAw= X-Google-Smtp-Source: ABdhPJxNYZPQVS1SAwN5aCudy3pB8pm9g8EJtDJhHHwh1KhMnvrRqIhUOIJXoj3oXV4ljo2rh4Y58A== X-Received: by 2002:a2e:9e58:: with SMTP id g24mr8574736ljk.195.1593804277460; Fri, 03 Jul 2020 12:24:37 -0700 (PDT) Received: from saturn.lan ([2a00:fd00:805f:db00:4025:a614:1d5c:b7bc]) by smtp.gmail.com with ESMTPSA id y26sm4411791ljm.46.2020.07.03.12.24.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Jul 2020 12:24:37 -0700 (PDT) From: Sam Ravnborg To: dri-devel@lists.freedesktop.org, Laurent Pinchart , Neil Armstrong Subject: [PATCH v3 12/21] drm/bridge: parade-ps8622: make connector creation optional Date: Fri, 3 Jul 2020 21:24:08 +0200 Message-Id: <20200703192417.372164-13-sam@ravnborg.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200703192417.372164-1-sam@ravnborg.org> References: <20200703192417.372164-1-sam@ravnborg.org> MIME-Version: 1.0 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: Jernej Skrabec , Martyn Welch , Jonas Karlman , Peter Senna Tschudin , Andrzej Hajda , Thierry Reding , Sam Ravnborg , kbuild test robot Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Make the connector creation optional to enable usage of the parade-ps8622 bridge with the DRM bridge connector helper. This change moves drm_helper_hpd_irq_event() call in the attach function up before the connector creation. Signed-off-by: Sam Ravnborg Cc: Andrzej Hajda Cc: Neil Armstrong Cc: Laurent Pinchart Cc: Jonas Karlman Cc: Jernej Skrabec --- drivers/gpu/drm/bridge/parade-ps8622.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/bridge/parade-ps8622.c b/drivers/gpu/drm/bridge/parade-ps8622.c index 6ab6f60b9091..54aa5270d2c9 100644 --- a/drivers/gpu/drm/bridge/parade-ps8622.c +++ b/drivers/gpu/drm/bridge/parade-ps8622.c @@ -459,10 +459,8 @@ static int ps8622_attach(struct drm_bridge *bridge, ret = drm_bridge_attach(ps8622->bridge.encoder, ps8622->panel_bridge, &ps8622->bridge, flags); - if (flags & DRM_BRIDGE_ATTACH_NO_CONNECTOR) { - DRM_ERROR("Fix bridge driver to make connector optional!"); - return -EINVAL; - } + if (flags & DRM_BRIDGE_ATTACH_NO_CONNECTOR) + return 0; if (!bridge->encoder) { DRM_ERROR("Parent encoder object not found"); @@ -482,7 +480,7 @@ static int ps8622_attach(struct drm_bridge *bridge, drm_connector_attach_encoder(&ps8622->connector, bridge->encoder); - drm_helper_hpd_irq_event(ps8622->connector.dev); + drm_helper_hpd_irq_event(ps8622->bridge.dev); return ret; }