From patchwork Fri Apr 29 08:53:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1925 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 851D83F057 for ; Fri, 29 Apr 2022 10:56:05 +0200 (CEST) Received: by mail-pf1-f199.google.com with SMTP id g5-20020a62f945000000b0050578328060sf3941884pfm.17 for ; Fri, 29 Apr 2022 01:56:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1651222564; cv=pass; d=google.com; s=arc-20160816; b=rtqlEWzPkLKzet8+u0V/KVTLqqttVpOS7zU0CdAnzVF7RgukE0xx+/XL1wd9tpHSM7 72OX0Ghu7SpE3WRyxoZ5GWjnV2JCIeLd45mLKQMA1Hml5gHVIYm0xYcoQ6uAa2A0HVng lNZkxS3hm71+gA4ov84tcG0cfpjhYc8jCjPU2s4nbks6vHQyV+30odyyWrJWk/AX28j4 FkbgD2S5OzMwwGryV3s5IH8k3KTRPZtdt31dEvKuPHU5WFZUtPJ9jEXfxrVxDhe1QOc7 98jAn0wfzQ429+kXK8GVEdUzv3m2ZA/cZRwXqZoAyZNwYGMzj1+RKtBXFzFa4tDRXcaG lY3w== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=aMReU1L26wg8V+ny77D8mqxOHDEg2jsFaWjSK7urKZI=; b=UFHu88MLWuh3rTfHVsnTj8tH/kUluhauh2CZgCW8zfi+pK09UbD+E4mTVeJluvDFnH v0u0kX/S+Yvt5ZLgOEfR+8X0HBovysTYot2RIMZZAkQWQ3zFzbwErCfkEROWqZ6yksW3 m+TWevEhCI+de1QwF8kdhzLFrXSl26NpH9q39oERX4ry/tzB+JnZwAuVFf+WhYqagsKq igapTd/mbhGY8jYnonHcV62DNB4d6kSurnlOtiSwhU1NVLgHtB2JILPZfgcJ6dqL1Wtl 3uuErrXwcvSnN11RU371gKKRZtEzOaAwJrMu8+RCP3cKlEMFQPOzxVDUKPabkg574Kgn Jktg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=DNur8v5V; 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=from:to:cc:subject:date:message-id:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=aMReU1L26wg8V+ny77D8mqxOHDEg2jsFaWjSK7urKZI=; b=q+iKuYdvs6w6OulMVcuUwEX75u3I2KVXqamqjqMlzZR6J8J9BlpRHhxLz3S9yPg3lf mwaoZ143PBUA+kKNYOLcLfcjI5hem0LL7AgfbBSVOaRcRZAB3UV2jO+ULlF+CWPNDFM0 Rivq8Rbyk66OMutwP89KHr1+D/ND1f4j17gpo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:x-spam-checked-in-group:list-post:list-help :list-archive:list-unsubscribe; bh=aMReU1L26wg8V+ny77D8mqxOHDEg2jsFaWjSK7urKZI=; b=5TA1OpkJB7rqlYpCG1WK/vW7nke4Jjx3INRbg7B4VP4oHshaG4UjifuNwH4dpFRECu SHd06BouM5zlR5kTSCe3dtG2x5EfQ3gOoblawemurhi7+uj+o0LkAMeAZqVdGczO+oDG ApTIebBRv/xQle79gpwtR1tf8eURbuLiy7WFtVIlpIVKavR3c5nncA1qe0pKoEYOxYED rvDaenRoHdLZLywWJIlhroxpyR1uCGwQZIOQzFSJrWiN9wePFzuCe0EFxpBhkh5E+1DB dNiekfEqfnJrqD2GpwZgpjfC83T+eZ5sUzXbTpZ9H+P3ceGNTjPm0tzp+xnmQuqNwicO 57aw== X-Gm-Message-State: AOAM531F6cDMFRm3TkYy6RPZ2hCrSUTyItXo8Y/fG+v414VcLyyjuGSV LNbnnyhTMGoYZ1pIYffHBEaYko47 X-Google-Smtp-Source: ABdhPJyUstJtTSqMu6FgjGxoNa+ucudDkMWi6m0q3vQTmxskC1bhPBrLWm7kJGeSMRz5NYuVRZmj3A== X-Received: by 2002:a05:6a00:2284:b0:50a:40b8:28ff with SMTP id f4-20020a056a00228400b0050a40b828ffmr39076705pfe.17.1651222564116; Fri, 29 Apr 2022 01:56:04 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90b:4a47:b0:1d9:80ca:c6cd with SMTP id lb7-20020a17090b4a4700b001d980cac6cdls6302871pjb.0.canary-gmail; Fri, 29 Apr 2022 01:56:03 -0700 (PDT) X-Received: by 2002:a17:903:1cd:b0:15d:3251:9ab0 with SMTP id e13-20020a17090301cd00b0015d32519ab0mr18204760plh.22.1651222563353; Fri, 29 Apr 2022 01:56:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651222563; cv=none; d=google.com; s=arc-20160816; b=ZMX2vAMM8eB1hHC/2cp0D+ToNT7o/y6EQWTyV1HYoE/7qTMWGAZcjXCwYBgGEaUuX4 6P21tXsOa+pZiG7qBVsImhlSJsZZ6+A28+u5dbUAVE1tlKtCr78GE7ZW8toGhhQjUzR7 i+Iu19Ur6b5sqtR7d3ki5lil9iH6i052Jnq2WcZcnYYyY/K/74B5Jc2xTr02rCFoKBlS UidF8wVLCrNT9bvlquJc6TDVi4XU8AaP8qrwefS4WGlVLA+cEogdTq+DM+a5X617Pci1 R4wO08R8/DiFQg2fKYvQwdYWtuiL+8aKKijP8WBRELqQvWDuF+koKOnd0lj+BRlzMfqO heKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=SSzFS9wSHMBoWm9vUIMAMrxz8gIMVdkk11n8JcOOYnE=; b=GHzD8ueLwV9Bz+7uJzfcdt5++0Mq7y2dq/yRx0LeVx9zjzPnNzrffvzJaLs1NhJyTG DUyrS3EOCGNHzUYJMA/JRcak8e66A8tgbDyt8LbI4BGVZsoBMaRj7TqWNcXuMM6zssMs G1TihTPiYFn/vM59FGu4ioFdofq+JzE1bpT1CAG5EBvW3sFwe/KV126gURPv52cOnAXt jXHDR/Qyq0VY5ehAO9ttpzMxW7/0lSCotpGnWYFXhTWyIxnwzYoFvp+2p3mjpE8agsDi KzwqhthIIGtTLGs8q35245yJg3UAxNI+02rnlNLWHPBDs4xYj7Xfi8+drHrqXGx3s4ej rpPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=DNur8v5V; 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 d17-20020a17090abf9100b001d94c4162easor4737767pjs.16.2022.04.29.01.56.03 for (Google Transport Security); Fri, 29 Apr 2022 01:56:03 -0700 (PDT) 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:90b:3904:b0:1da:2957:b5ee with SMTP id ob4-20020a17090b390400b001da2957b5eemr2688085pjb.59.1651222562983; Fri, 29 Apr 2022 01:56:02 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c00a:a0a9:b5c3:f85c:afa7:cae9]) by smtp.gmail.com with ESMTPSA id o2-20020a17090a4e8200b001d26f134e43sm9247781pjh.51.2022.04.29.01.55.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 01:56:02 -0700 (PDT) From: Jagan Teki To: Linus Walleij , Maxime Ripard , Laurent Pinchart Cc: dri-devel@lists.freedesktop.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 1/2] Revert "drm: bridge: mcde_dsi: Drop explicit bridge remove" Date: Fri, 29 Apr 2022 14:23:57 +0530 Message-Id: <20220429085358.1699141-1-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 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=DNur8v5V; 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: , commit <3730bc6147b0> ("drm: bridge: mcde_dsi: Drop explicit bridge remove") has removed downstream bridge as it's prior commit <3d7039e1e649> ("drm: bridge: mcde_dsi: Switch to devm_drm_of_get_bridge") added devm_drm_of_get_bridge for looking up if child node has panel or bridge. However commit ("Revert "drm: of: Lookup if child node has panel or bridge") has reverted panel or bridge child node lookup from devm_drm_of_get_bridge as it breaks the non-trivial cases the first child node might not be a panel or bridge. So, revert this commit to switch the previous behavior of looking up child panel or bridge. Signed-off-by: Jagan Teki --- drivers/gpu/drm/mcde/mcde_dsi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/mcde/mcde_dsi.c b/drivers/gpu/drm/mcde/mcde_dsi.c index 960b49ea2ee5..083a4728654d 100644 --- a/drivers/gpu/drm/mcde/mcde_dsi.c +++ b/drivers/gpu/drm/mcde/mcde_dsi.c @@ -1122,6 +1122,7 @@ static void mcde_dsi_unbind(struct device *dev, struct device *master, { struct mcde_dsi *d = dev_get_drvdata(dev); + drm_bridge_remove(d->bridge_out); regmap_update_bits(d->prcmu, PRCM_DSI_SW_RESET, PRCM_DSI_SW_RESET_DSI0_SW_RESETN, 0); } From patchwork Fri Apr 29 08:53:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1926 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 6BBD33F057 for ; Fri, 29 Apr 2022 10:56:09 +0200 (CEST) Received: by mail-pg1-f198.google.com with SMTP id z18-20020a631912000000b003a392265b64sf3577456pgl.2 for ; Fri, 29 Apr 2022 01:56:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1651222568; cv=pass; d=google.com; s=arc-20160816; b=Qz2j2pn8lED0i9zvLbOogcmM1r4M6VB8V3ZMk8af99lNWYjrcmZgW13pf0sfxLAjfU u/eswvovMR9h/JFpnR8gH7oELjXq73HiO/zL/IntLeuhOZtR2XBioizfFZq84qvKEVqr g01liJ4AaeRkYBj/8m7usoa8LdOfZxfNaGgy5dAyMPvoQXTFFf3ICDeIRNeH3gPCeNDe lG+NSfJaO0lox5SZACPOZMhA+HlBbrzxF8MK4h7usrDHzRjJSJZ4NLBOLXHfDRLDVkVr OVyba8f6ad6WGMibeSm3Eyp4GeD22BqoyhdQOhlLH1Pbq3Yr5PAGbc8LBR9qUafUHhdE +UNg== 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=I146zEDDosbwrEC01FhPJoaW1Dp1H9lfztpf58/Tgbo=; b=rHtlkWkw/M15KdgZKM3iOoO3z8LX/x5jaZGjHPtdZ5C50Elb/Yp9uLC+uUt3xLCIjn YmnzH2wuzRgrfnG5ece5aBETAM3ggQDjJQ52IsKhs0DfAsaLnXzhQnNRXLj3MqFFdW1K x9Ra/Br0goQQcQfbStGhgPpGRG6+eKDAMeRsc9tCBE/GiXoenoP4wAbVcXkeG2cm2b1U M+0IgH8TA6qp/Uu4WVIQ9nlGnWcobdLqOzwpMOznc2WdHthtapx9RmdvRGUxLZ9mitqc N7lkZ2bwV3Ax3jQTiere47X/9nOmI4xZMoTvlKKrDxoMx2QlQ1HZXMW6bt+3C2YG8rJ/ qLfg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=SB8PJZQG; 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=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=I146zEDDosbwrEC01FhPJoaW1Dp1H9lfztpf58/Tgbo=; b=G7/UOiOI74hQFfAH2wi36dky4wT9N7+bTLM1U1UGi+PO/dpQ401YIl+RqvaOZvQ7t1 v9qg1RCNf8K5PohuKxzx2BM2UT+RmftYFW7BNlTKGrxkGeAfj6Lusaqv/V67VswRboHo +2Makmtp1kegthSZmCAHHTuiBaTtpteHN1v80= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=I146zEDDosbwrEC01FhPJoaW1Dp1H9lfztpf58/Tgbo=; b=vlMexYSrqMjPmn3n96O/023Aoojzn4lFWcOepU9wOB36ybuSOqX5r6/1JVsA8Sbxf3 INFU3rmLaUbmpSokSTzqHn3fvHHxTxy9sPTjmSHpvO5mufEO/uMoM3cd0MydMuTvEWMp Rvu9rhxblngjXOQ9u7HKio/WlZXbwE0X3WlGQqIkWQR3+GXrPojsUIJWpokNMjXHno4r /NT1HkNkmE9FEuI/zU83igaHK96ruvALmM5wZm2ElMjqof3OIn7QR1LEL8B580LNvyvv YHAD0J2G8gEmDmluMmKNRE5pdN3YgiLdVR9SMgUapJPOP4vN6aGhj1I5xTcVBpy4rhBy ZXUA== X-Gm-Message-State: AOAM532GtNQfpfG76mS2JOuDlyEzrrL75YacN9oGlTeZEBVSHBOGAkLr qBVWIM3kqQF9uTtuQx4ZbloiD7NP X-Google-Smtp-Source: ABdhPJxrnvrsJg3RIxfafLenhTcQkHB2ZSUGbpIeARSZyhysz3Na+0kXtURLb3qp+Ew16WogmxAhGw== X-Received: by 2002:a63:a901:0:b0:3aa:1cb6:d44a with SMTP id u1-20020a63a901000000b003aa1cb6d44amr31182590pge.339.1651222568032; Fri, 29 Apr 2022 01:56:08 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:4a06:0:b0:3ab:6545:7f71 with SMTP id x6-20020a634a06000000b003ab65457f71ls942148pga.4.gmail; Fri, 29 Apr 2022 01:56:07 -0700 (PDT) X-Received: by 2002:a05:6a00:1749:b0:50a:8eed:b824 with SMTP id j9-20020a056a00174900b0050a8eedb824mr39044209pfc.50.1651222567253; Fri, 29 Apr 2022 01:56:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651222567; cv=none; d=google.com; s=arc-20160816; b=KtWRiH6ezxPSrxfZyIzs1GR/Jys+VxUdYWyUvt2XB7uhOdfD+hNtV5phXdHEL5LrK0 AKqcNHklhsw2fhPd0GW4hifkAIPkJ5zxa82y0uFEVK0Ui5ib68ih67KtDmEk6G3hssLZ EVGnhSeV3zpU9Y2RNm/EGaCS0gHgbJmiUipHQahG3sHhk0vxvkazLUtsZk9AGs16yVIG XVzX7c4VHZoVOXT8Q32CfovXNOvkJpDKvKT/eFA47hf3TmYJIf5mbsf3L+sMJep/77WR w/Q9YkHLgB0gEPuq2Fdq1cWuAL53OVsReAgFY2q1QlGMLWe43KMlHJrJ94p/+aUAtmsP 3uyA== 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=vtAatQi32uY0Mr/+NfdPdeyNea4utijeqFZuOoc4TBU=; b=Kv2i4J7bwD5k+/JBdvNcbMoc1c4MvZoNQm1NMoirwbJribzcq12J5HSDRM0wWANTIh KQb7dSyfbUPvgl/f9WxHtoFiNunsy09RoDc5XEigp38Ss67Z4FK/HhKMtag61bHrfans /l+xP9wgCGTHKwGRtJQJWACfbva8jNc8pu9KVQWYY5k45bLluiVB3qLwfsM0qvH6xoCn L9aKvfPR835CVU/RvBOM0BJT7E8p3ghNX/uW4KPXYn1XwiqwPeGX/+Wczt8Nlswt+dV6 UHmWLOu7h1IdAxyyN3z+COFfeY8wQUYJv2TAE3Ei9+fq67BM8jm0B8k9s2nCkGlgjLVK DKlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=SB8PJZQG; 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 98-20020a17090a0feb00b001cde2e78fd1sor3110328pjz.8.2022.04.29.01.56.07 for (Google Transport Security); Fri, 29 Apr 2022 01:56:07 -0700 (PDT) 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:90b:38ce:b0:1da:49fe:d04d with SMTP id nn14-20020a17090b38ce00b001da49fed04dmr2706556pjb.51.1651222566931; Fri, 29 Apr 2022 01:56:06 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c00a:a0a9:b5c3:f85c:afa7:cae9]) by smtp.gmail.com with ESMTPSA id o2-20020a17090a4e8200b001d26f134e43sm9247781pjh.51.2022.04.29.01.56.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 01:56:06 -0700 (PDT) From: Jagan Teki To: Linus Walleij , Maxime Ripard , Laurent Pinchart Cc: dri-devel@lists.freedesktop.org, linux-amarula@amarulasolutions.com, Jagan Teki , Jagan Teki Subject: [PATCH 2/2] Revert "drm: bridge: mcde_dsi: Switch to devm_drm_of_get_bridge" Date: Fri, 29 Apr 2022 14:23:58 +0530 Message-Id: <20220429085358.1699141-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220429085358.1699141-1-jagan@amarulasolutions.com> References: <20220429085358.1699141-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=SB8PJZQG; 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: , From: Jagan Teki commit <3d7039e1e649> ("drm: bridge: mcde_dsi: Switch to devm_drm_of_get_bridge") switched to devm_drm_of_get_bridge for looking up if child node has panel or bridge. However commit ("Revert "drm: of: Lookup if child node has panel or bridge") has reverted panel or bridge child node lookup from devm_drm_of_get_bridge as it breaks the non-trivial cases the first child node might not be a panel or bridge. So, revert this commit to switch the previous behavior of looking up child panel or bridge. Signed-off-by: Jagan Teki Reviewed-by: Linus Walleij --- drivers/gpu/drm/mcde/mcde_dsi.c | 44 ++++++++++++++++++++++++++++----- 1 file changed, 38 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/mcde/mcde_dsi.c b/drivers/gpu/drm/mcde/mcde_dsi.c index 083a4728654d..5651734ce977 100644 --- a/drivers/gpu/drm/mcde/mcde_dsi.c +++ b/drivers/gpu/drm/mcde/mcde_dsi.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -38,6 +39,7 @@ struct mcde_dsi { struct device *dev; struct mcde *mcde; struct drm_bridge bridge; + struct drm_panel *panel; struct drm_bridge *bridge_out; struct mipi_dsi_host dsi_host; struct mipi_dsi_device *mdsi; @@ -1071,7 +1073,9 @@ static int mcde_dsi_bind(struct device *dev, struct device *master, struct drm_device *drm = data; struct mcde *mcde = to_mcde(drm); struct mcde_dsi *d = dev_get_drvdata(dev); - struct drm_bridge *bridge; + struct device_node *child; + struct drm_panel *panel = NULL; + struct drm_bridge *bridge = NULL; if (!of_get_available_child_count(dev->of_node)) { dev_info(dev, "unused DSI interface\n"); @@ -1096,10 +1100,37 @@ static int mcde_dsi_bind(struct device *dev, struct device *master, return PTR_ERR(d->lp_clk); } - bridge = devm_drm_of_get_bridge(dev, dev->of_node, 0, 0); - if (IS_ERR(bridge)) { - dev_err(dev, "error to get bridge\n"); - return PTR_ERR(bridge); + /* Look for a panel as a child to this node */ + for_each_available_child_of_node(dev->of_node, child) { + panel = of_drm_find_panel(child); + if (IS_ERR(panel)) { + dev_err(dev, "failed to find panel try bridge (%ld)\n", + PTR_ERR(panel)); + panel = NULL; + + bridge = of_drm_find_bridge(child); + if (!bridge) { + dev_err(dev, "failed to find bridge\n"); + return -EINVAL; + } + } + } + if (panel) { + bridge = drm_panel_bridge_add_typed(panel, + DRM_MODE_CONNECTOR_DSI); + if (IS_ERR(bridge)) { + dev_err(dev, "error adding panel bridge\n"); + return PTR_ERR(bridge); + } + dev_info(dev, "connected to panel\n"); + d->panel = panel; + } else if (bridge) { + /* TODO: AV8100 HDMI encoder goes here for example */ + dev_info(dev, "connected to non-panel bridge (unsupported)\n"); + return -ENODEV; + } else { + dev_err(dev, "no panel or bridge\n"); + return -ENODEV; } d->bridge_out = bridge; @@ -1122,7 +1153,8 @@ static void mcde_dsi_unbind(struct device *dev, struct device *master, { struct mcde_dsi *d = dev_get_drvdata(dev); - drm_bridge_remove(d->bridge_out); + if (d->panel) + drm_panel_bridge_remove(d->bridge_out); regmap_update_bits(d->prcmu, PRCM_DSI_SW_RESET, PRCM_DSI_SW_RESET_DSI0_SW_RESETN, 0); }