From patchwork Mon Jan 23 15:11:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 2658 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pj1-f72.google.com (mail-pj1-f72.google.com [209.85.216.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id DB6B93F039 for ; Mon, 23 Jan 2023 16:13:01 +0100 (CET) Received: by mail-pj1-f72.google.com with SMTP id e11-20020a17090a77cb00b0022925dd66d3sf9568544pjs.4 for ; Mon, 23 Jan 2023 07:13:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1674486780; cv=pass; d=google.com; s=arc-20160816; b=xAjuxgIy42oJssSojE79cGcl3kZp5jdZPyHl9mwkQMC8O5gAR5N6folNkbF2lEv6gO hhLxEfQ3of1bzKS0Z6VpH2hyv+Hvw9SPKZn1C2UKyJlqn6JUABmqeEDu9F2+ZT34ucmR JgCxnv1uGqacwxPqeC6oivLExRlMaGN9yo3dz36aqr89DngCktVjs5Uc7q9rRv7VqmK/ pUBYa6kqadXC0jhYAzQ8SMXmzBhSjc8cki/firAemgd724AqJq+4fjAsP8gnbDDrS/XA DWfalgWbmC2a9CjnbUugToDEvjazmRA+b9sjzuJiVWydN6W3L4XDIxjrNMlBS7VnrWhi 0vDw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=wlRQ7g1hfLilQYMH3kKtPdXm+8f9QQje/2pG9r40bIg=; b=dNRDHBEZWfO83CArYzddR9dn2juEUAx9UhVom2vMzBqg/cOX+XyxVVtEUxZT8d+WF/ SGj8eCf8RHExKfYmCi629XAnryUOcmRt3bYwrMmiTgKKQ8i8BuR88B+yvmSR9PmnzEAo 8CjxPr2dRy0Ux6AVU3G2FUsHA6toICFOFZ5Q1bMTHPi9w/LQufJF+AJbGq55YlEMqHJ2 A20sHuscZgXHmxv7R5/bznOMLc/W69h2cMxpvBu8ftU/UYv3Bb/zcN5PG/uQqzfY/atU 3YzMr4TeFv6vnA/S7BKMNYDQAjN472DQhYMIc99XxMWhf18FnyRKtGYoDfomQ1YQeKsu pEGw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=UwPu6XfW; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=wlRQ7g1hfLilQYMH3kKtPdXm+8f9QQje/2pG9r40bIg=; b=obExheR4HI+euPPSE2U5BdL7j3Bex4UMTWL2CLBlzsrOHwj3LExTVxKhLi6itScZLW AmGIgvjx4BXZkYJQo4Z/hpSmUaj2JhproQ0yNzsN+FvobfvOtrfCwcxouz4ytayAyYJ/ bzvLFrCBP0BmMN84vk7q/WfSdoHOALBaAKU9I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=wlRQ7g1hfLilQYMH3kKtPdXm+8f9QQje/2pG9r40bIg=; b=jgCo51EsGh6CauDW04PSNYBoOYmKt3yxL7y2bdCBF0AcRvmzcc8V7Id0fr88XNfwLd /khEN1Yhfhh652faQdXY5ta0zVYgw6ml9iL9SaWSBfsupf7mgZ/l1O3P9fV99m1nzCrf MsOLu/6IPi9ro15aBhaCOyV7zS7Tcb+UnKzF+2L8cCWRv2l7iNsbZP9qv4JkU9Q4+q33 ZMYxEq71ZeEwZVW01yf0bJ1SKlRiPr0JuvZHPdGdLTDraPSwBdlkpL2yvJKW/dUGdp/b aj3BnNb8nYYdPI7djPn7QAjLhHVP4HNFjUQNBbvybyBfNxXMh+oiEXV65P2czb/4UJC0 OG5w== X-Gm-Message-State: AFqh2krPm96us6lsfQiJbaAczTtDG5MxQynJodfVqqm9XqSILzy7jXC8 wkEGk6+Lc1NGzzqx0QQPuB23lrfl X-Google-Smtp-Source: AMrXdXvmj5qXSLfJF1UttFEmufqG5GZPbM+y9c/N6b+Wx4lKEQvbaDuoVmDhqg52kjY5d4G6FM4oEA== X-Received: by 2002:a17:90a:43a1:b0:22b:aaab:4f10 with SMTP id r30-20020a17090a43a100b0022baaab4f10mr1834063pjg.203.1674486780585; Mon, 23 Jan 2023 07:13:00 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:d507:b0:22b:b830:313 with SMTP id t7-20020a17090ad50700b0022bb8300313ls8529148pju.3.-pod-control-gmail; Mon, 23 Jan 2023 07:13:00 -0800 (PST) X-Received: by 2002:a17:902:ee51:b0:194:87e5:8fa2 with SMTP id 17-20020a170902ee5100b0019487e58fa2mr26080431plo.6.1674486779670; Mon, 23 Jan 2023 07:12:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674486779; cv=none; d=google.com; s=arc-20160816; b=Mr7EOC4ltde1t2weTs9Alp3MuPkITtSLuHyvI0hjNgmPQhpjoV5khAwgHvuDbKgDTB wsLs9oOqySyUU0f/a+5s/zgPH71nR9LTIppNlYjkNm2dADvxzUxZ5O9CTeBFz8UzapMb c3PQnUIcvKrWRwB8FDsP+PcTe2sjQ90Z/SUBzwSkIUEMHh2+WXqV0gxGvlnlpb453Rlp mdOumGYxc9H9RYPcsgt1W6JfyPYNP/8YOR3j/DgZ7E9vstxxuzFDuRSlTjwM+Jo1Cjlu kEfeOFUjrrtfa1417Gsdqpjgj1Uxco3HFNlvDpWHioSnwegDLq8EUv1Hy5OWIjUNfibl cu6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=mGTDxW/0FHkTpFMtVsyR5B6P9WvJldck4Y7e8f4Ze3U=; b=ntTno0qnmw7nQMylmbtSXcumxp2eJndgxpPw+7ZcHEwpP6zdcOp2N4VxkrkyKm7z1i uo2L85oXcSx11md6nbb3W4tJbOM+DktHtGCx8FhagJYvsysqAwofyVjppR44mjpbadpG Z8FNgGR7lccBO1WDFkyXun7PtAlZTIE6KJ0GIaweyzl5Au2i4+FM2P44NH1zKySGs4eL KM10PTy4dL8yqpoU9pmqM+H1kOWNGT5TNdtoosfoNW02CkUHi3oVF340eK9EVMM1OuOz eF9r9ZwOb8rnRbZt4WNn9Ce+b7oB1dZO8pZbMlMXulQjM5gIRZ2NjSidTMrSYPDLhLS3 YlpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=UwPu6XfW; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id y4-20020a170902ed4400b001948c66c431sor9839325plb.149.2023.01.23.07.12.59 for (Google Transport Security); Mon, 23 Jan 2023 07:12:59 -0800 (PST) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a17:902:8493:b0:194:3dce:deb5 with SMTP id c19-20020a170902849300b001943dcedeb5mr26778292plo.27.1674486779349; Mon, 23 Jan 2023 07:12:59 -0800 (PST) Received: from localhost.localdomain ([2405:201:c00a:a15f:2279:f361:f93b:7971]) by smtp.gmail.com with ESMTPSA id d5-20020a170903230500b001754fa42065sm19207111plh.143.2023.01.23.07.12.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Jan 2023 07:12:58 -0800 (PST) From: Jagan Teki To: Andrzej Hajda , Inki Dae , Marek Szyprowski , Joonyoung Shim , Seung-Woo Kim , Kyungmin Park , Frieder Schrempf , Fancy Fang , Tim Harvey , Michael Nazzareno Trimarchi , Adam Ford , Neil Armstrong , Robert Foss , Laurent Pinchart , Tommaso Merciai , Marek Vasut Cc: Matteo Lisi , dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, NXP Linux Team , linux-amarula , Jagan Teki Subject: [RESEND PATCH v11 04/18] drm: exynos: dsi: Switch to devm_drm_of_dsi_get_bridge Date: Mon, 23 Jan 2023 20:41:58 +0530 Message-Id: <20230123151212.269082-5-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230123151212.269082-1-jagan@amarulasolutions.com> References: <20230123151212.269082-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=UwPu6XfW; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , devm_drm_of_dsi_get_bridge is capable of looking up the downstream DSI bridge and panel and trying to add a panel bridge if the panel is found. Replace explicit finding calls with devm_drm_of_dsi_get_bridge. Signed-off-by: Jagan Teki --- Changes for v11: - none Changes for v10: - new patch drivers/gpu/drm/exynos/exynos_drm_dsi.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c index df15501b1075..4a165764121d 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c @@ -1470,18 +1470,9 @@ static int exynos_dsi_host_attach(struct mipi_dsi_host *host, struct device *dev = dsi->dev; struct drm_encoder *encoder = &dsi->encoder; struct drm_device *drm = encoder->dev; - struct drm_panel *panel; int ret; - panel = of_drm_find_panel(device->dev.of_node); - if (!IS_ERR(panel)) { - dsi->out_bridge = devm_drm_panel_bridge_add(dev, panel); - } else { - dsi->out_bridge = of_drm_find_bridge(device->dev.of_node); - if (!dsi->out_bridge) - dsi->out_bridge = ERR_PTR(-EINVAL); - } - + dsi->out_bridge = devm_drm_of_dsi_get_bridge(dev, dev->of_node, 1, 0); if (IS_ERR(dsi->out_bridge)) { ret = PTR_ERR(dsi->out_bridge); DRM_DEV_ERROR(dev, "failed to find the bridge: %d\n", ret); @@ -1531,8 +1522,6 @@ static int exynos_dsi_host_detach(struct mipi_dsi_host *host, struct exynos_dsi *dsi = host_to_dsi(host); struct drm_device *drm = dsi->encoder.dev; - dsi->out_bridge = NULL; - if (drm->mode_config.poll_enabled) drm_kms_helper_hotplug_event(drm);