From patchwork Tue Sep 3 15:31:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3402 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 028D53F1F3 for ; Tue, 3 Sep 2024 17:32:01 +0200 (CEST) Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-42c78767b90sf30919745e9.1 for ; Tue, 03 Sep 2024 08:32:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1725377521; cv=pass; d=google.com; s=arc-20240605; b=dgL7dDnKsIYcz/6Uu90g1YwYtN96e12Xt0JXe0W448Y3pY+0hBPKOeIG4M3mVp3OrU vNMdElLryEhD7HyewobprmI4c6RZi8SQPc35WGEyNkcCrYugxIH25PIwjh9EqsRD5FwO aoZ0+HXPkvKALpbx5pOrAmbXBc+Qm16l/3mN4z45oCGgOF9XcjiJcL54uV8uGJdhorG8 OVmEck3mjzPtA1zDF9yDQLgtMy2ULGTI8i/j6O9KO2eJnl40IQ/vdaRvE5E/MoU+9sAx qNLFjhvjW23A5dArAgAy7KRDgEcgrtr5xtcbzf0shITSf3QHZ2JW30cCPkdEwGWgJROX UtPA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:message-id:date:subject:to :from:dkim-signature; bh=BjatmFYhA6Vuvi3gUJvCFYrU5L7eekKDgsyfQezhMaQ=; fh=f/okG6O19NeAdYcBwUPkTZxN4jOeHAcCvsmSAO/55mY=; b=Air9D65G5mTJmVQPsf5GHFFFnBWOiU4BYLTW0oL05NAnM7KUhK23OJ6EQg2NPhwkjH rBakI+VVfDS8pkU7LMijUvhYvhIoUbQltlAZph1yAoiUEW3CDfO4C9KHL9yXHaxzf+I3 4YZ92tYGGhNeEYvJJkq+o5CMF+mUDBaLtkMPnbapl2CQ16BjcY/FBUYJGcyUYunzut9E Vdetm3HkpfiC1Q/eFFZ41kiYoWo5JHNcS0ETviiKneXUA29a6gml7Bj8fgerxQMH2xlR IO8OQWGY/XJ/EXScIXyYac0dMFuGsJgD+r9MuYXl1Hdoazr66xUvgX4Q/Zv5RntL++2n LqTw==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=nof9wYyi; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1725377521; x=1725982321; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:message-id:date:subject:to:from:from :to:cc:subject:date:message-id:reply-to; bh=BjatmFYhA6Vuvi3gUJvCFYrU5L7eekKDgsyfQezhMaQ=; b=oy2EeMt4LCZFA5Qbe89cwaB8ltp4hP9dHsWUodxGUq0hHAGqeXjxmGxyOKJ58EpnHw PklhO5bRSe27Z9XuQOuo6iXJD62hlAsvTpcdzWfqbOJhU5B+8Up8s2rFFDQXETzGbT5K 2HshugJZC5jDHiIJSAiA0c8t4LtcMC8gsd8Gg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725377521; x=1725982321; 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 :message-id:date:subject:to:from:x-beenthere:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=BjatmFYhA6Vuvi3gUJvCFYrU5L7eekKDgsyfQezhMaQ=; b=nsjz0WTKPLah31TAIx7E3RCdPkXGV0+tT160Cgo8Tg+E2pNQln+pVhjguYUVHQ96ZS 7ZytwscyvHjzSF5H18PhgyJeHoPsMbbPUhWBHAYobzCW6p55Wk22qgfraPxw5mT7GfiR XWaMxsF7T7OEJwHfb16SanFErt8bqa7TDdVl+GVYjggrDbDsBVAx94Vp5Bp4SxmdUA5Q tG9kKYkVlqOHcG05hdq33M52BFG4eqcj23ISvxgyFBFuaYP0G63WDq9WoMMXBZZLfJgE BZSoiTVZTRRcx58WE9yMWIq0dWJRsq7qNIKd8VzR7SEJlgy5wFKnNTOHYHXZM3StZiip ZlgQ== X-Forwarded-Encrypted: i=2; AJvYcCWhtRPVNwuFIS9eLv3T6NYwIWdARlYWHBaJRdX5Pl1IoR7JuzkXE55f4KuGvaZBuHN8qLsucyb7/S6IGCyi@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0Yzn7FcXvMRg5YWvlsVUizOs6zKJCN8GKbA2bsiiYcWpX47nWnob f++izhhnZ26KR5rHUrjYT/Eo74OtSOZWZZa1xDqGyrjfU2Zhnyiz17TlZSh5Lj4vFQ== X-Google-Smtp-Source: AGHT+IHCRc0GHx69NAR1uTTnMX0vPd7b4tge27PquDxv4Yvw8ab5bhukfTdH7iTklofDSzqLhZUAzw== X-Received: by 2002:a05:600c:4e45:b0:426:5dd0:a1ee with SMTP id 5b1f17b1804b1-42c880ec1f6mr28873525e9.2.1725377521623; Tue, 03 Sep 2024 08:32:01 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:600c:3590:b0:427:96b1:a664 with SMTP id 5b1f17b1804b1-42bb283d3b1ls8608775e9.0.-pod-prod-03-eu; Tue, 03 Sep 2024 08:32:00 -0700 (PDT) X-Received: by 2002:a05:600c:3ba6:b0:426:647b:1bf7 with SMTP id 5b1f17b1804b1-42c88108625mr32806695e9.32.1725377520064; Tue, 03 Sep 2024 08:32:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725377520; cv=none; d=google.com; s=arc-20160816; b=ludfxqW9Z0pG8g+CFpYbG3M8Ni9R+bOtmM8TCx5Yoeh8MHeIbM0njiyfPArvtC7m+i PYlfQKNujH2axnceOE5fL+3RW8wuh5n2dwRJaH7wYVxjMS7qnBva8eVMV5uJuM5EilHW zxlMGLVLzzSVO2Rfo+Kf4WUoZ/XY0f3UOwCkzg2rxwb3Em+Pqi4q3aaxLZwj7/T6r7au P4NYTBrDGzF5ZB2JUgEmSkQ9tPNCGbR5VNFqSSe/BwD6LqByXUcMw4X4GpWA3k4WhRpt zW7Wg9XSQr1N2M6Np/rpu/T5GNzJ62XIIDR6y+pYGQoTkU1OzSqXWQJfen3VwU1D1ISV qepQ== 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:to :from:dkim-signature; bh=dFq31ti2T2YFsOGEOqfIjXVNQp0atwFOg4wwyQ1+CAY=; fh=FtQepR0uNoeKT2PVdKfTKOkvEYfwbRmoVE9BmlYw3tk=; b=OXtNTHDn0s+5bWPDi1GSBbn6ikzSkUT18aHfNt9rBrDRzGUPWpRqsjTfeSZLklsMg+ EQuL29MawIyMp2U1qX/m+yA29zbUzReXzqoO+5Yyqg1/BMhPDJ93GG9s06wpeBhc49cB Cwup49e9/Izo8vUc3AFtL6+FIcgNsDbVDn8fVh3OoBsgfMtUMy2IpUo0kVvfjPx8Ud+K cLxdt8Az7y2ApL/pUJ72do9T1JhWG+Jop+5xRwL8ys2Qwt5lPkuoAFoJ/jYoYUGrx/Zf j/zUqL2BsZTOCmcGAQ4EJPhi272ztreZ+bY+kLkcgiScGusHttdSFEEurj/7ZX89DU+h Tjhg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=nof9wYyi; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@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 5b1f17b1804b1-42bb6f8c693sor6906845e9.0.2024.09.03.08.32.00 for (Google Transport Security); Tue, 03 Sep 2024 08:32:00 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a05:600c:1e19:b0:426:641f:25e2 with SMTP id 5b1f17b1804b1-42c8810315dmr30642605e9.25.1725377519470; Tue, 03 Sep 2024 08:31:59 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.42.65]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42baf1b0c18sm192963055e9.37.2024.09.03.08.31.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Sep 2024 08:31:59 -0700 (PDT) From: Dario Binacchi To: linux-amarula@amarulasolutions.com Subject: [PATCH 01/10] pmdomain: core: fix "sd_count" field setting Date: Tue, 3 Sep 2024 17:31:48 +0200 Message-ID: <20240903153157.918185-1-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=nof9wYyi; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@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: , The "sd_count" field keeps track of the number of subdomains with power "on," so if pm_genpd_init() is called with the "is_off" parameter set to false, it means that the power domain is already on, and therefore its "sd_count" must be 1. Co-Developed-by: Michael Trimarchi Signed-off-by: Dario Binacchi --- drivers/pmdomain/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pmdomain/core.c b/drivers/pmdomain/core.c index 623d15b68707..ea56e65d0b93 100644 --- a/drivers/pmdomain/core.c +++ b/drivers/pmdomain/core.c @@ -2111,7 +2111,7 @@ int pm_genpd_init(struct generic_pm_domain *genpd, genpd_lock_init(genpd); genpd->gov = gov; INIT_WORK(&genpd->power_off_work, genpd_power_off_work_fn); - atomic_set(&genpd->sd_count, 0); + atomic_set(&genpd->sd_count, is_off ? 0 : 1); genpd->status = is_off ? GENPD_STATE_OFF : GENPD_STATE_ON; genpd->device_count = 0; genpd->provider = NULL; From patchwork Tue Sep 3 15:31:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3403 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 866FC3F228 for ; Tue, 3 Sep 2024 17:32:03 +0200 (CEST) Received: by mail-lf1-f71.google.com with SMTP id 2adb3069b0e04-5334573b3e6sf5442017e87.2 for ; Tue, 03 Sep 2024 08:32:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1725377523; cv=pass; d=google.com; s=arc-20240605; b=kISof7RSrt/UdGhwvJ2tZHzG1GjLBJFuJsk36i+BH4Db/gXOtPYJoKkzmxl7rMVY4L dwH+ZblsvVKgsiPrYnKy4T/7Rb3ARUtjzN0dOD7P2XuiiYdKZb3Pt7KDfMwg0EBzFsqO /QZd5Qt+jWhCNP7AGNdbbGV7FIwvLS/qhzmUwKx+ObXZ1CMsV8sIYCFeO7/zJPPhw1Ms qCA3QB+D99JMM92k79Tm2RVJyX3bTo19ZbvAXyHAVyO88AAypVaCzcsskGOpWeAlU54Y DbBb9XOlW2gMXUv5ZyoJUvw2UAgb2+m9lq+/7+xixQXerGGVXzibZquaksnH5SFfVkSH hU/w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:to:from:dkim-signature; bh=6jd7CNxY3W1r0+nU86r+jd5URwP79JPUmDmdcUXl2GM=; fh=5LtSSQYnWaPkYT7HIoPe6Kl2cX2BNOo9Ms1Pyxemu3s=; b=LQwjbu20SrYNggqJpdUGz+PKNfwf2CeCHI4mf/NZDPUDbTy/HEX+RK7jsHkvas5heV deQQHoISyd35CMOgLHJ+QgrRooMW0fZkNFNRoAaPgZy/DYADItkWDnhVasv2l+uzXT6f 6m0ruVAWBuqanT/uWCKBlPLoomiXeFxbWonMZ57tJihilSTaTGoHbsYIIk6l3c1RKLuR MnXzfaOaJchLOZ+1Q+o3gW4f3y7DuUt8ABkpNhpEWq+tBkUcAbRaF6MRwHffoMXjeXAx N6+QUMsDrD6LiDZGBGkqzixh976wc7qmc/TdrBSzTbe70TR96zYvmEpr3ihKkOMKMfxq 13Ug==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=fC866vp6; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1725377523; x=1725982323; darn=patchwork.amarulasolutions.com; 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:to:from:from:to:cc:subject:date:message-id:reply-to; bh=6jd7CNxY3W1r0+nU86r+jd5URwP79JPUmDmdcUXl2GM=; b=oy69tMgwufqTK4U7hvKX3RbAY9Ra70mNP9ZbyM1lgabzKvxR3NA/uMk0Q5vqPEjVgP UJS32A6PlosapctXUEie8zclQ+wVB2nr2dBaaGe0rxietdi1hCg2JFl6YU6mFvMaKZVh qLy7+7g2xSRqnP/F3nVI1JwJ26aRbvLe3iSh4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725377523; x=1725982323; 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:to:from:x-beenthere :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=6jd7CNxY3W1r0+nU86r+jd5URwP79JPUmDmdcUXl2GM=; b=VyaaW/lx8KZX+r1cS0of2L4rwUATNNGDFoCOakatRC9BbETTVoXHhjghf6ZguwHene aGBUnfkGCD8bnU0zL0wE7P3sKX2kH16ViZBExT6DY+ltDcILDLzvZkRxcfotKjXNZBRt 7x3Z37jAZcEi6NlcJZeoueGiuqLE6iFGMug3Rlq48iytzXusnQJ2C5te1pK4T3x8rBmj dMtLmPW01YSIPG6yuW6+MIGVtDixbmnFs1GBWI3PdzjAdhKhWWyPry0B9/HFGsV5VqTC zQZvHb6EsP3VuNnbH56ot1fBGgiTiboIzUQK1sgBIXI39DGSqVYsnt2ekJbIhfbLWuwF ggRA== X-Forwarded-Encrypted: i=2; AJvYcCUnXy+DRpQKoG9s8MWP5HJ+yDLQlA/r+ZiAeBSZXkeQRNPknkuGn2WgDFbVqFANB1+uskeaUdb8xUypXY/N@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YyBFUTXkV4MP6x0Oc8adlQY9lvT8EctO0NYaeYudzI7tM8FJkLL z86vZL9AmAy7EIPzwBbfqvANLgv2iyIz3RMUsZLZQDEDRRVNsHLTzF4RMUdGoCfhmg== X-Google-Smtp-Source: AGHT+IFj8KrfLBZETwCsL9URrrqUpK5WCA/RmgScf4XZ15//+pzRf1bFBpz6BKO6VoyTN7tswUV8lw== X-Received: by 2002:a05:6512:108e:b0:533:1cb8:ec6e with SMTP id 2adb3069b0e04-53546b3fdd6mr10259618e87.33.1725377522791; Tue, 03 Sep 2024 08:32:02 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6512:3b8f:b0:52e:fdfc:47b6 with SMTP id 2adb3069b0e04-5353d8131e2ls93767e87.2.-pod-prod-01-eu; Tue, 03 Sep 2024 08:32:01 -0700 (PDT) X-Received: by 2002:a05:6512:ba7:b0:52f:c24b:1767 with SMTP id 2adb3069b0e04-53546aff12cmr10739595e87.19.1725377520875; Tue, 03 Sep 2024 08:32:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725377520; cv=none; d=google.com; s=arc-20160816; b=W4I5IrLRNZaVGTx99AFLNfHrv4SS8xFJ1gzv2mKEuheogFVs035g47EkK7hI4pzjx+ sKzUV47aCXLVs21s+c5YGzLS7EW0ccHxCLZduWW1i3n9+2l3hO090PTTnx3UdfX0WvtE c/W9bZJ8oscHMuydBt2w3UryHq8uj8ay/5dig97Z8F3mxQiFOF8Sc6ESvDSBtg3z6KIn c1a1AGqIWLqZYSEjU/OH5PqCX+dmcF9yIlR58fDtYwnAgdtwjNM6cF+ituEpERhTi3hB ALvpeHj/syvplDhX5k/f1vKU1ik+UUQ5H1/40caivv2Ibvxfh3otbnn6rbvjV7O7se9B idQw== 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:to:from:dkim-signature; bh=T+W66Pay3a9BJnElH8sWmDkqYefZDUmdGoos+YPU1C4=; fh=FtQepR0uNoeKT2PVdKfTKOkvEYfwbRmoVE9BmlYw3tk=; b=u8NCffHxNc/xjYQ6PwGjA3/JDoQf+jk1ocT0xEdhmA9SeEX4FfzOB3a06AUupsMIjG avWCMe5R/KJ7Tpq2xRxYnI0PwQPD5+63puzizuifH9Ddn5Im4E9oui8GV63ZvX+D1dr2 bFQrJuq/XXfUEytWGUaVkhYUQE8YGLq4p8+xmpKaU7trwUZG2u5U/ayq7rKbCigpQ9kB 8eg4DRTXF3yeC3b1w1YGUicGxDmGeLA13VwW8wuYA3bDMNilEaFeAkJKj+ZL6o+jQYhO SlY/bo0qnYm0/FfQT2GWJn2KJJGLSFRAuqdwBR/hTCVp55BS5HNM/i/JvBhVz0hPzHlW B7iw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=fC866vp6; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@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 5b1f17b1804b1-42bb705d2c3sor45753725e9.4.2024.09.03.08.32.00 for (Google Transport Security); Tue, 03 Sep 2024 08:32:00 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a05:600c:1f87:b0:428:6f4:57ff with SMTP id 5b1f17b1804b1-42c82f6cdf6mr48490875e9.35.1725377520230; Tue, 03 Sep 2024 08:32:00 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.42.65]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42baf1b0c18sm192963055e9.37.2024.09.03.08.31.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Sep 2024 08:32:00 -0700 (PDT) From: Dario Binacchi To: linux-amarula@amarulasolutions.com Subject: [PATCH 02/10] arm64: dts: imx8mn-bsh-smm-s2/pro: add simple-framebuffer Date: Tue, 3 Sep 2024 17:31:49 +0200 Message-ID: <20240903153157.918185-2-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240903153157.918185-1-dario.binacchi@amarulasolutions.com> References: <20240903153157.918185-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=fC866vp6; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@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: , Add a simple-framebuffer node for U-Boot to further fill and activate. Co-Developed-by: Michael Trimarchi Signed-off-by: Dario Binacchi --- .../freescale/imx8mn-bsh-smm-s2-display.dtsi | 31 ++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2-display.dtsi b/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2-display.dtsi index 7675583a6b67..c6f286eace38 100644 --- a/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2-display.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mn-bsh-smm-s2-display.dtsi @@ -4,6 +4,35 @@ */ / { + chosen { + #address-cells = <1>; + #size-cells = <1>; + ranges; + + framebuffer-panel0 { + compatible = "simple-framebuffer"; + clocks = <&clk IMX8MN_CLK_DISP_PIXEL_ROOT>, /* lcdif */ + <&clk IMX8MN_CLK_DISP_APB_ROOT>, + <&clk IMX8MN_CLK_DISP_AXI_ROOT>, + <&clk IMX8MN_VIDEO_PLL1>, + <&clk IMX8MN_CLK_DISP_AXI_ROOT>, /* pgc_dispmix */ + <&clk IMX8MN_CLK_DISP_APB_ROOT>, + <&clk IMX8MN_CLK_DISP_AXI>, + <&clk IMX8MN_CLK_DISP_APB>, + <&clk IMX8MN_SYS_PLL2_1000M>, + <&clk IMX8MN_SYS_PLL1_800M>, + <&clk IMX8MN_CLK_DSI_CORE>, /* mipi_disi */ + <&clk IMX8MN_CLK_DSI_PHY_REF>; + + power-domains = <&disp_blk_ctrl IMX8MN_DISPBLK_PD_LCDIF>, + <&disp_blk_ctrl IMX8MN_DISPBLK_PD_MIPI_DSI>; + dvdd-supply = <®_3v3_dvdd>; + avdd-supply = <®_v3v3_avdd>; + display = <&panel0>; + status = "disabled"; + }; + }; + backlight: backlight { compatible = "pwm-backlight"; pwms = <&pwm1 0 700000 0>; /* 700000 ns = 1337Hz */ @@ -59,7 +88,7 @@ &mipi_dsi { samsung,pll-clock-frequency = <12000000>; status = "okay"; - panel@0 { + panel0: panel@0 { compatible = "sharp,ls068b3sx02", "syna,r63353"; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_panel>; From patchwork Tue Sep 3 15:31:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3404 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-lf1-f69.google.com (mail-lf1-f69.google.com [209.85.167.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 327363F1F3 for ; Tue, 3 Sep 2024 17:32:04 +0200 (CEST) Received: by mail-lf1-f69.google.com with SMTP id 2adb3069b0e04-5334efaf344sf6369573e87.0 for ; Tue, 03 Sep 2024 08:32:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1725377523; cv=pass; d=google.com; s=arc-20240605; b=QDrsNr09zgRgHA4P/N1PPC0JqxS5fm3LHPg9A5chCL1kHjz6tL1gTnYjpNf3bCU3Ur KyXJtN62H+FNqQoxDYkQo3ZTE0E1IzkFcpxxfwhOT7cI+zjeTw590ZZhFpwOSrNlpWC4 cYX5k2Gnzo9Dln5ObkxHKa4f2HbNR1m5jeM0iteF3B+qsIc2Vj+Kha53UN8Nba8ih4eE ShA+vOqlhAK9n0F4/Db+RQbC8nQFpAr4uZna5EyN6oA2NE715EPhNhZtLkx7arr5TWFV JMSd9dQXWZGw3E+mIaIJo5BYL7Lf5e1qTdd0kpRy2ZLRE2knx79UV+4vrZex9wP6EFRe vYbQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:to:from:dkim-signature; bh=flPCFMtcjcKeYt1oy0Qvb1wGMY+4laxck1M6ljgkxWM=; fh=+m6uaNoW6agPDHbtn9RsDr1e1RHAzvYpFK387dPxW54=; b=R+2GIkm7g+qwbL1zkHAPhSe1k1/GvuBYUkWkYfYMoOuXwDeHXbTuQ4+MeL7BUgjdMz IP+lzjFGl0u/uqWg9948rpIALV4ZMhA6VoobFAxdOuNb40X7Yk/7Lb9sGdzCpUzJtAtK Sr09a+02cOyazrrU92nKdWNkFKhkpK7OiEjee0EOCRzU7yvfTOpZ619lKEvtOpvC2pCu d3zt8UDeHgsGse50mwEPyx8vfae+Xmcjkyec+R1r05sqQlQWVvtzADAa4HmZYFCK3j4W BrHUwDXTo7QMdegEhZ7Jkqvz4k7lH8jSr++2groetn3qwsjlSn5yT1EAjU6Qv9Kax+Pe oyIQ==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ol5lgdzZ; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1725377523; x=1725982323; darn=patchwork.amarulasolutions.com; 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:to:from:from:to:cc:subject:date:message-id:reply-to; bh=flPCFMtcjcKeYt1oy0Qvb1wGMY+4laxck1M6ljgkxWM=; b=Yt/+cvYGygSnl3qgI6iD4zPbmw43LwcZG57L4jZISzCwRTWLsWHz6Qnato3tZh7YPR 4+nXHPr8+i5sy7NBClSy5VhqwcmYPML81Po23ddDH6WN3DR4fIJO10inw4vY9AjvHkxx W0DLAMIFyPoqIe4bLctSTErm+ZdnuIZxDR7Uc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725377523; x=1725982323; 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:to:from:x-beenthere :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=flPCFMtcjcKeYt1oy0Qvb1wGMY+4laxck1M6ljgkxWM=; b=t0rHIqOMTvtig/UtdWT6x9AHY0RyFo3eGWM1i3hcUvWG3dz13b+6v2sEOCAwze7MQa aNRWSAqO4A7HjI0v5nYlzNCMlmMaBquVravBZAe6Q/eJkNZm9SrgvBuFU6ydimnJdBPl d1JBSOEA3n56gfg/9nnMMj16NJMn2Vlpd0GM+V3433wFo/54W8YMRwydkrGcxPm4lXVc itfdOYXEnDjnwc1o0ROvfVK9Ud0w6eAPBlkCBHS3h3b/zXdmxE88HERCv3UzA4OMQBcd kHxiv2izlR46209oe+/uyqqACtKCDmznX6ppHdHPnW4HFhjPZh3c2K9/6HdQsJpAxtJ4 HOBg== X-Forwarded-Encrypted: i=2; AJvYcCUSh+zNiIcIYWwhb20TZtGsAGI7Gc3ZuNxvp20B94+iv8c+T5hRjzgkMUo5VLHAXGcL1PKU++miueao6PeV@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YweSrnleBGmS8YUkkq0osIQuHRbe+fnAhcL9sMT7kN3RFARomp/ jfSYqG2joC+A2zr0xvpnSfSTnqO1lOc7rnME1cZe6xkYCOYW4eIHkMg/r7yux0Sy8A== X-Google-Smtp-Source: AGHT+IGc9O5pt33M5umA42NKFF44qXTlTO2RukifmFpQ4qhk7JkUfEvtrKaI8bWVdzG4NotKnslnFg== X-Received: by 2002:a05:6512:3984:b0:533:efaf:ab26 with SMTP id 2adb3069b0e04-53546b44d77mr8430451e87.36.1725377523461; Tue, 03 Sep 2024 08:32:03 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6512:3b8f:b0:533:45dc:5477 with SMTP id 2adb3069b0e04-5353d8125adls331433e87.1.-pod-prod-07-eu; Tue, 03 Sep 2024 08:32:02 -0700 (PDT) X-Received: by 2002:a05:6512:e94:b0:533:483f:9563 with SMTP id 2adb3069b0e04-53546b8d711mr8876490e87.45.1725377521769; Tue, 03 Sep 2024 08:32:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725377521; cv=none; d=google.com; s=arc-20160816; b=LO7OUXl2HqLiandnjGKX1ANJVv5ttNDtGJkGMlezNIaQEWICgyaMFKyy8Au/BzdeEs CCvDB+6H15olv/JENpWDwvnRHIOZKKzYbRoozG67+mp/JQe2o/QX73Sl8t62p1dpI7MV GQEtuve01SJ/oyUC1k4wWrgWc3tTmfvg62puFYYlS2+C0noO0occ/CagFxqzpdGQPpN7 5nWwiy9X3TTwvlLcvxBhbnNFuojDCfIMSGsa9JuR1dJr0pdl8uDuiYblWo5jmm1zr667 FW5KGdAOETFZUvQh9OUPQxonsnGPx+fc8677NQE8CxCItKJbRoUeczzhS6QBzTMzMwhd 93+Q== 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:to:from:dkim-signature; bh=u754FsTh92kSCeEwlHoxvBGzK4iDD3LIN1G5Kljo444=; fh=FtQepR0uNoeKT2PVdKfTKOkvEYfwbRmoVE9BmlYw3tk=; b=kAXjeBi2f9P3cY/X97KDW8MS+4QHPuoGwINpTiifGr/2t462NlS43wi979+/EaSxb2 qZyg7E7IcDdpvwJzRyavghw26+3SLS3vB+P4xy6Mbrod/MmFP6iaDXq3rI1qcNyRCEo6 N+MvMgk7HcfrGdTtYdal88tQQql5X0vu9+Nfpg6cZ8R5ter4WVcoT9IDXUhyCO09g0YP scu4AODD4UWQcR6XYUiHiTABbYVaDPQ/R6PxQ1qRnzcZDPpMS4AsBsPtGsBgBOTfw71s 4gSJn8v85vrwJaD/3QN8oAKciAFkv65pUFWUgI3qxmumZccKFezKMzTCbxUDmUMMKcdm nzTw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ol5lgdzZ; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@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 2adb3069b0e04-53540849f0asor3358041e87.27.2024.09.03.08.32.01 for (Google Transport Security); Tue, 03 Sep 2024 08:32:01 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a05:6512:2810:b0:530:ae0a:ab7a with SMTP id 2adb3069b0e04-53546b0ba94mr8348017e87.17.1725377521007; Tue, 03 Sep 2024 08:32:01 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.42.65]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42baf1b0c18sm192963055e9.37.2024.09.03.08.32.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Sep 2024 08:32:00 -0700 (PDT) From: Dario Binacchi To: linux-amarula@amarulasolutions.com Subject: [PATCH 03/10] pmdomain: imx8m-blk-ctrl: don't turn on a power domain already on Date: Tue, 3 Sep 2024 17:31:50 +0200 Message-ID: <20240903153157.918185-3-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240903153157.918185-1-dario.binacchi@amarulasolutions.com> References: <20240903153157.918185-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ol5lgdzZ; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@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: , The patch, by informing pm_genpd_init() with the "is_off" parameter that the power domain is already on, prevents the power_on() callback from being called, thus avoiding the unnecessary repetition of the hardware power-on procedure. This feature is crucial when supporting the simple framebuffer, as the power domains have already been initialized by the bootloader. Co-Developed-by: Michael Trimarchi Signed-off-by: Dario Binacchi --- drivers/pmdomain/imx/imx8m-blk-ctrl.c | 49 ++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/drivers/pmdomain/imx/imx8m-blk-ctrl.c b/drivers/pmdomain/imx/imx8m-blk-ctrl.c index ca942d7929c2..83e68e87651c 100644 --- a/drivers/pmdomain/imx/imx8m-blk-ctrl.c +++ b/drivers/pmdomain/imx/imx8m-blk-ctrl.c @@ -166,6 +166,22 @@ static int imx8m_blk_ctrl_power_off(struct generic_pm_domain *genpd) static struct lock_class_key blk_ctrl_genpd_lock_class; +static bool imx8m_blk_ctrl_is_off(struct device *dev, struct generic_pm_domain *genpd) +{ + struct device_node *node = dev->of_node, *child; + struct imx8m_blk_ctrl_domain *domain = to_imx8m_blk_ctrl_domain(genpd); + const struct imx8m_blk_ctrl_domain_data *data = domain->data; + + for_each_child_of_node(node, child) { + if (!of_node_name_eq(child, data->gpc_name)) + continue; + + return !of_property_read_bool(child, "fsl,boot-on"); + } + + return true; +} + static int imx8m_blk_ctrl_probe(struct platform_device *pdev) { const struct imx8m_blk_ctrl_data *bc_data; @@ -173,6 +189,8 @@ static int imx8m_blk_ctrl_probe(struct platform_device *pdev) struct imx8m_blk_ctrl *bc; void __iomem *base; int i, ret; + bool init_off; + bool *pm_runtime_cleanup; struct regmap_config regmap_config = { .reg_bits = 32, @@ -221,6 +239,11 @@ static int imx8m_blk_ctrl_probe(struct platform_device *pdev) "failed to attach power domain \"bus\"\n"); } + pm_runtime_cleanup = devm_kcalloc(dev, bc_data->num_domains, + sizeof(*pm_runtime_cleanup), GFP_KERNEL); + if (!pm_runtime_cleanup) + return -ENOMEM; + for (i = 0; i < bc_data->num_domains; i++) { const struct imx8m_blk_ctrl_domain_data *data = &bc_data->domains[i]; struct imx8m_blk_ctrl_domain *domain = &bc->domains[i]; @@ -274,7 +297,8 @@ static int imx8m_blk_ctrl_probe(struct platform_device *pdev) domain->genpd.power_off = imx8m_blk_ctrl_power_off; domain->bc = bc; - ret = pm_genpd_init(&domain->genpd, NULL, true); + init_off = imx8m_blk_ctrl_is_off(dev, &domain->genpd); + ret = pm_genpd_init(&domain->genpd, NULL, init_off); if (ret) { dev_err_probe(dev, ret, "failed to init power domain \"%s\"\n", @@ -283,6 +307,24 @@ static int imx8m_blk_ctrl_probe(struct platform_device *pdev) goto cleanup_pds; } + if (!init_off) { + ret = pm_runtime_get_sync(bc->bus_power_dev); + if (ret < 0) { + pm_runtime_put_noidle(bc->bus_power_dev); + dev_err_probe(dev, ret, "failed to power up bus domain\n"); + goto cleanup_pds; + } + + ret = pm_runtime_get_sync(domain->power_dev); + if (ret < 0) { + pm_runtime_put(bc->bus_power_dev); + dev_err_probe(dev, ret, "failed to power up peripheral domain\n"); + goto cleanup_pds; + } + + pm_runtime_cleanup[i] = true; + } + /* * We use runtime PM to trigger power on/off of the upstream GPC * domain, as a strict hierarchical parent/child power domain @@ -324,6 +366,11 @@ static int imx8m_blk_ctrl_probe(struct platform_device *pdev) of_genpd_del_provider(dev->of_node); cleanup_pds: for (i--; i >= 0; i--) { + if (pm_runtime_cleanup[i]) { + pm_runtime_put(bc->domains[i].power_dev); + pm_runtime_put(bc->bus_power_dev); + } + pm_genpd_remove(&bc->domains[i].genpd); dev_pm_domain_detach(bc->domains[i].power_dev, true); } From patchwork Tue Sep 3 15:31:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3405 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 4E8AD3F360 for ; Tue, 3 Sep 2024 17:32:04 +0200 (CEST) Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-42c80412dc1sf24126845e9.2 for ; Tue, 03 Sep 2024 08:32:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1725377524; cv=pass; d=google.com; s=arc-20240605; b=T+DTRwkw9x0WcBhuXZivlOzdWdm1zkPnloB5UPs/5fBj+Ytvjh61TYI4VYs1MM8bDr Qy31nZxePlk8VR012KXd+ih6i8mO1tpgh1dnKPg3Fs9nqv45jLV152K2f0X5mkUtRaSE k4jHibZLD8g3ih1KnMi2abfgf6RWXy18QKLOLXj6OMPMSpkt6Xsi6p9y7j69sKwg/jew 2HSznWM/CvoIb32n82nkwSpnnDYCd3Bd9FtC3pFOipFSJUdKuVRQNzE7y+PsW7OTNC+L Bo8Jgvg1odG0dOG3IiFVSPoziI5fvLZ0meMRPqI9zBGgzt80wrz6ucWe4a/8kEvESdDR KASQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:to:from:dkim-signature; bh=RvLgs0HOrXEMp1XjUNUssN6CvLW8YgVLDzKmU21Ndjc=; fh=bt7s73bR2luCzX3GJ5Qik1IN1M8eH/3GvqXZmB4NW7Y=; b=Fcyg7WAzKKrwQr28NVuzn/b2mYiceTiwrkk7Okv1ujIpJDJVeUuJbZZ8+EcHrVlI/5 HcqwLbYvGCo1y2A3A9ri65Ks93P0ZsNOFdNHGq7SoPUu4RicWexWxNL/X6jaUKJqGWnV cTgDt7lMhuPxCba5mJ8Euq+G+yVHpIEJeluELdGOJ4AKwKuLtogH2pjnX7stmAomzlCl rY39B0XrlIG0FSTsty5fTIuKKe0qeuMRVDx0zFrktAsbU6rUOezz6JdRry3MceOjzAqg J1DbJNzY6Du9NXogSsOxWi7A4Elhaaqlat0aPJ1reaaT4S2gfj1vlxtcQ+cluN2mxOnz AUOw==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ZO59yvaL; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1725377524; x=1725982324; darn=patchwork.amarulasolutions.com; 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:to:from:from:to:cc:subject:date:message-id:reply-to; bh=RvLgs0HOrXEMp1XjUNUssN6CvLW8YgVLDzKmU21Ndjc=; b=nqc851NqI2ji4ivguR2hOoPkhbK7t5j5Wc9mZODsy3Ql0DY8oKxszqlC9kT6DfFssE u3XS3AFbre4uQo6ymbeRWxbuLDS/f1rJDlmGNGRdFlG4I/TR2veFkS6cBd79YWXko5ol ac+CMpdG2eyVj4lwq5OCWIyYNQD5ZeHl4v1zM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725377524; x=1725982324; 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:to:from:x-beenthere :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=RvLgs0HOrXEMp1XjUNUssN6CvLW8YgVLDzKmU21Ndjc=; b=TFEfYRw/a0asscqD5ZXFkkvcn+4X2IUyHreXuzedg8c6RXBwiRbBJwPyvoyNUwTdJp JAcTad8l87y+EqNusI6jPV9P9U31FnSfhK1SgCuxT8us/lcLH7pp6iroJubircxpYhAT nNn+ZEhr93qWHEYbJ8YE9Q6G01tc6du+VO4UDd/xyZEzNB+vGY40P/X61QK2JklXfaHh zOEXrgPhizSZeQ/+QhUqcWsNDgMCjBTFkH0Ags7WMPrR8AHnfJggYT4oz2X7+Iw6lK6f d6qytZVhLFbTSKNiISHBAnG60eqhVc1BUayARxIPvOaBzwE0fkPFbUFfe6lmr+2OJk40 1i2Q== X-Forwarded-Encrypted: i=2; AJvYcCVfNh78Q1Ri1myfxLCJUAsl0fbw0tEzqG3sTjA7KPXjLSdyshGJEPHHoqrnbTgz/BfRxbey7FmJNLGWlEQ7@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YxDG7PLXXMVWZPQP64/JiWvC12DMEhtlEcA8kx5y/q4oFll000G wVcq0MCC1Uafqp4mEzL75ACnQtKSbSbjVjsnnsJqtCQxb5CAWRkTG+7zL4IiNTIK9Q== X-Google-Smtp-Source: AGHT+IGvpBQW0QnqrDMw87gs4g1/7CPmmUCwaMq97BlECUdBLo89aKDeO5RJdP+9FqzflTQl266Wgw== X-Received: by 2002:a05:600c:3595:b0:426:61e8:fb3b with SMTP id 5b1f17b1804b1-42bdc64e6e3mr85590725e9.27.1725377523933; Tue, 03 Sep 2024 08:32:03 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:600c:3596:b0:426:6eba:e1f4 with SMTP id 5b1f17b1804b1-42bb28403e8ls18132135e9.0.-pod-prod-02-eu; Tue, 03 Sep 2024 08:32:02 -0700 (PDT) X-Received: by 2002:a7b:cb95:0:b0:429:d43e:dbcc with SMTP id 5b1f17b1804b1-42bd835564fmr78885575e9.3.1725377522291; Tue, 03 Sep 2024 08:32:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725377522; cv=none; d=google.com; s=arc-20160816; b=HE0qFOn6/R81BFpOWJMFyOpPG8Kq+a87SQHMF/IZo8pmsK353a2EZc5Sij5D/3yKh7 76T+/QUwBNYxoNAEyVsdxNa4zyQq2ImbxQKYoJACWbG6pzPPt7OMyC0fRFvZCG0BIo9e gUMmz2VChivgr9fUsySMcF2K91MhSI+GYh/ja5w7fVsqmJSfBbb+XBM9AseI+7EymcIG GF/rx0KPtfiKXkhThY4ZyGcPKkkfXrKnqZ6E6yuEPhGhU4mR5Vct7PI4W4yNdohEgQx+ GI83l764zj/5BrMTFtkQvy6uD4EjAZWJ09vqHWAk7JRIxzaJsBDuQwm0W3P7wPe8j2kr t2mA== 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:to:from:dkim-signature; bh=XEQZPsX2VOc/YYlt3n/YuNQPwhUJv0qFQcV6Vk2muh4=; fh=FtQepR0uNoeKT2PVdKfTKOkvEYfwbRmoVE9BmlYw3tk=; b=dpTYPBJeOjSlRC4+r5yYvThhM6KRmvZzxPum7OWmjXHVDYdxLd9IU9hBlC1zDwPGMB VPxnu45mxHA2YLaPbtklEQxgRFnkIwgcTCzsDRZsSxsZ46YGKJGjWH3WddCo6raXLQ9B IGkne1LNgEA3sD5K/2tZV5A9Pf23M6ZC8dR+fIgkPNEkx0cLSkpjbf+06/W8Fdr4+pGG Qabf4YA8I5igkj/i+vKWsEAoiVq7EX8N4dekE2hYJ+Q+pEOKL6puZ2+3i5VBqoAHzG/U 9FXr2rW2I3uxXll+695dA6g0GzSk2z/Jju1m9VPct3TQ2uvls5e/66tHRUE+2TZmsq6a h3dw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ZO59yvaL; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@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 5b1f17b1804b1-42bb7078248sor45141365e9.6.2024.09.03.08.32.02 for (Google Transport Security); Tue, 03 Sep 2024 08:32:02 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a05:600c:3d92:b0:42b:afbb:171b with SMTP id 5b1f17b1804b1-42be48fa9e7mr74316525e9.35.1725377521698; Tue, 03 Sep 2024 08:32:01 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.42.65]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42baf1b0c18sm192963055e9.37.2024.09.03.08.32.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Sep 2024 08:32:01 -0700 (PDT) From: Dario Binacchi To: linux-amarula@amarulasolutions.com Subject: [PATCH 04/10] pmdomain: imx: gpcv2: replace dev_err() with dev_err_probe() Date: Tue, 3 Sep 2024 17:31:51 +0200 Message-ID: <20240903153157.918185-4-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240903153157.918185-1-dario.binacchi@amarulasolutions.com> References: <20240903153157.918185-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ZO59yvaL; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@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: , The patch standardizes the probe() code by replacing the two occurrences of dev_err() with dev_err_probe(). Indeed, dev_err_probe() was used in all other error paths of the probe() function. Co-Developed-by: Michael Trimarchi Signed-off-by: Dario Binacchi --- drivers/pmdomain/imx/gpcv2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pmdomain/imx/gpcv2.c b/drivers/pmdomain/imx/gpcv2.c index 856eaac0ec14..374732335752 100644 --- a/drivers/pmdomain/imx/gpcv2.c +++ b/drivers/pmdomain/imx/gpcv2.c @@ -1356,7 +1356,7 @@ static int imx_pgc_domain_probe(struct platform_device *pdev) ret = pm_genpd_init(&domain->genpd, NULL, true); if (ret) { - dev_err(domain->dev, "Failed to init power domain\n"); + dev_err_probe(domain->dev, ret, "Failed to init power domain\n"); goto out_domain_unmap; } @@ -1367,7 +1367,7 @@ static int imx_pgc_domain_probe(struct platform_device *pdev) ret = of_genpd_add_provider_simple(domain->dev->of_node, &domain->genpd); if (ret) { - dev_err(domain->dev, "Failed to add genpd provider\n"); + dev_err_probe(domain->dev, ret, "Failed to add genpd provider\n"); goto out_genpd_remove; } From patchwork Tue Sep 3 15:31:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3406 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id D39293F228 for ; Tue, 3 Sep 2024 17:32:05 +0200 (CEST) Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-42bb9fa67d7sf52850045e9.0 for ; Tue, 03 Sep 2024 08:32:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1725377525; cv=pass; d=google.com; s=arc-20240605; b=NGMVXjFIEWHAKKzFt0WH6xVaqpKmJQu6l4FgBM77cA4jFU7Gbv6gXG6hfF7VXaK+RP lFNH9UAeBLGXw10rCqHZi93Xgs/Atp1S52HGWLUqOtCNL0pWn7yL4taLNp6y1vO4cHgO ZlRReRbyM4KKdccFjqctqwOw4/Yn3x3NBmRhZaFuNq3WklASrHoIcRiaxC3BgLSM1Y9W j8GscYa0Islk87BGneLtKm6Hdq9VfJjXR2d560MfGygtTEKPoJlhHXdHxkazNXwXnkY6 UwEf/IDh2yvlzm0KpD++SU/o4fgKW+O3MxEjKNmX1aH/5T9GF17m+GNyxgNen8/5z4EW /6ng== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:to:from:dkim-signature; bh=J0oCOBvw+S6KwfV50PCYj+UQ+LpnyWegF0wDbc0IUSE=; fh=EdeXsWpC3Z97tyvYfdsq++m+qnEXpwIleBUMr8Q6jnI=; b=bsG6tnI6qxUnUVuWysTdqjg7+IUIu9Ow/fTLr8bGPBMy4UNVIbGdqXMu/lM428uUTV bAdvAroVXgVz61/F7Jizibfual9NVexVyqFq0F0xeOIJH62SFhg/Yi8A/EXhcvnCKVTC maoubT5hckgkcL7/2QTuIiooQ86F6xr3YF10V+4FmiYsOwUmEcTp/2BJWbLsj8mqYCDv SUZerCpDbSyxeBP7jnkrJKEy8VlWg8y9pyQESSMSe5nY6o9j3Yq9anJRJmql9rQRK/+k b01nQvjMKS9iyBqt9rxsMTR4gp7br0qWMNTZ3SKBGtt7qZQLOhZv3djoFZk1++3p/NFP /Pjw==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=UZAP8ZK7; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1725377525; x=1725982325; darn=patchwork.amarulasolutions.com; 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:to:from:from:to:cc:subject:date:message-id:reply-to; bh=J0oCOBvw+S6KwfV50PCYj+UQ+LpnyWegF0wDbc0IUSE=; b=CxhUobsE7TAEig7mc1qs1t9co8AaOUQ5aebb3Vgm17sY9Wn0M1guJBsPXP9mBLkHsb cRQ4AH/MKPgsZ1oUmAyMZPzqM6JuamVv4pzXDV2LwRJUtQQy/HxU9dB/B8lKLgawFQq0 7ra+HzKmwaUPePRvmnpAHALq5fXq0gVZeJJ4g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725377525; x=1725982325; 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:to:from:x-beenthere :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=J0oCOBvw+S6KwfV50PCYj+UQ+LpnyWegF0wDbc0IUSE=; b=NckNzmY6J1JvfCreiE0I9IXQzJqCfVQ0XR1JTEXEMT3q5/Vp3OWcCDOJwJ0XaJjw1b PLQfPppSYBrzbqxdN+G/CGH3w5oYTpG9lV1Y1nnyEcxiF1IcxiNgpC4JynV5fGTGBvir i5PjTirs/ZuaW5DfPvnq2YH8xk217i13BwIRuyg2E68eMnT/fpIWDmG4NYjtHIkjLE7y Tzg1kjeRfuQE6Y3tDOjsAh2WfF05tnq3oeO02asOgtGU2xWxAaJ/wIU3PB4z2UYJWPtR X3oQnMK2/tE9GIx0MQqMqocw7KKhy5B+XoZEWtNH3QNSr/3O07wq0W2qZvrmvEKIUVAu Q+mA== X-Forwarded-Encrypted: i=2; AJvYcCWQLIea/Hhs2lw+h4bX1RZsHWk+bpvf6BiZzb4hZHH8UfSd1z+fePFRjrtKo4OmUCbGX01eY3qz0nHzR9Cg@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0Yy/yPsACBzxUM6Famm9K9zynlOVR4hMBlzBvJ3+G9EDuOGmavlE 9QZTDXF8Fpyl3GI51vB9F3/YEQl1djdxm/mgj+tKVjmg0/qBhcOkQKP3y2Bwm64Q5w== X-Google-Smtp-Source: AGHT+IGeEz3UKkxKTndXXt6HP3fhbVELnxkfl6gw7E2mAGqiDQkX4kf3B2NMhp0LjIOw9NoGXZTUDg== X-Received: by 2002:a05:600c:a01:b0:426:6857:3156 with SMTP id 5b1f17b1804b1-42bb01edd50mr168216425e9.27.1725377525301; Tue, 03 Sep 2024 08:32:05 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:600c:3590:b0:427:9669:d780 with SMTP id 5b1f17b1804b1-42bb28398bfls1349335e9.0.-pod-prod-05-eu; Tue, 03 Sep 2024 08:32:04 -0700 (PDT) X-Received: by 2002:a05:600c:1548:b0:426:59d3:8cae with SMTP id 5b1f17b1804b1-42bb01b9302mr160751305e9.13.1725377523697; Tue, 03 Sep 2024 08:32:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725377523; cv=none; d=google.com; s=arc-20160816; b=BshbQnnmdRJFPUjMUU0553iMAIsTOHEgB8zPaxFHm6N4aHWgibDzpmZ5Wbdn3dl58q NEV4VBDEUnbhmgJJvDG9yIJUZVx4YF0niajwJJvzUqoBO2UH8RKY2XL37yBOlF3Q3U1C NRVOtiq0wifsWS9Mn2WcCOs14fGAZQKnkJChByTK55i/jgIW640HPkSiJnkMZvPv2o7r 1NUjWBQ5gbxBRrfrEkR0mlibHlATHhafn4ZtzcLIN1jqWwPTypdwZKvhrOM6RFSdCTT+ nFqMdcVymKi2OUfKFKq5AHjH+aWNqY57DWDEYrOk7wH2m9g1M3JwOgS+XSePjEN/s81w XOlQ== 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:to:from:dkim-signature; bh=/BDd7c4xTgXZo0WxyxenDl3Nw/iA1QAcTDBZTuDPcQw=; fh=FtQepR0uNoeKT2PVdKfTKOkvEYfwbRmoVE9BmlYw3tk=; b=hfnegFXyJ6Qfy9UDu7ENHBttZ/7MCs5jmGWIHgTo04tou7IAh+iqqjQnGxP5FeFsa6 mLmU3cGuBxVsmr6/dyigvPXXwfAGIaeABib9atxTRy2fl9kmMrJOVX6fVPRpgS08AMdm jVQIoROsUl53Dss6FjE7XdRkBN92JBoNRxiU1hPnj8EzQ568ph4Ft4PXXupef7WD1SFO P3NgNuQs4pUZg9pPlyFVKKNJlhq1WPi0YcOh22l/BGcDGh/TSxzdnuPQLXgUnL8gfPgJ HrIRo2lbYimIHkbCSCEXNhk7qlOktjaU/4l/hNag7TixiYoVlriwU8JZ1hiqCDMlmcOL 1qnQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=UZAP8ZK7; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@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 5b1f17b1804b1-42c87b7c69csor4124805e9.9.2024.09.03.08.32.03 for (Google Transport Security); Tue, 03 Sep 2024 08:32:03 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a05:600c:470f:b0:42a:a6b8:f09f with SMTP id 5b1f17b1804b1-42bb01ed85amr162014775e9.23.1725377522551; Tue, 03 Sep 2024 08:32:02 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.42.65]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42baf1b0c18sm192963055e9.37.2024.09.03.08.32.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Sep 2024 08:32:02 -0700 (PDT) From: Dario Binacchi To: linux-amarula@amarulasolutions.com Subject: [PATCH 05/10] pmdomain: imx: gpcv2: don't turn on a power domain already on Date: Tue, 3 Sep 2024 17:31:52 +0200 Message-ID: <20240903153157.918185-5-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240903153157.918185-1-dario.binacchi@amarulasolutions.com> References: <20240903153157.918185-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=UZAP8ZK7; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@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: , The patch, by informing pm_genpd_init() with the "is_off" parameter that the power domain is already on, prevents the power_on() callback from being called, thus avoiding the unnecessary repetition of the hardware power-on procedure. This feature is crucial when supporting the simple framebuffer, as the power domains have already been initialized by the bootloader. Co-Developed-by: Michael Trimarchi Signed-off-by: Dario Binacchi --- drivers/pmdomain/imx/gpcv2.c | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/drivers/pmdomain/imx/gpcv2.c b/drivers/pmdomain/imx/gpcv2.c index 374732335752..3c1982e46769 100644 --- a/drivers/pmdomain/imx/gpcv2.c +++ b/drivers/pmdomain/imx/gpcv2.c @@ -1324,6 +1324,7 @@ static const struct imx_pgc_domain_data imx8mn_pgc_domain_data = { static int imx_pgc_domain_probe(struct platform_device *pdev) { struct imx_pgc_domain *domain = pdev->dev.platform_data; + bool init_off; int ret; domain->dev = &pdev->dev; @@ -1354,12 +1355,32 @@ static int imx_pgc_domain_probe(struct platform_device *pdev) regmap_update_bits(domain->regmap, domain->regs->map, domain->bits.map, domain->bits.map); - ret = pm_genpd_init(&domain->genpd, NULL, true); + init_off = !of_property_read_bool(domain->dev->of_node, + "fsl,boot-on"); + ret = pm_genpd_init(&domain->genpd, NULL, init_off); if (ret) { dev_err_probe(domain->dev, ret, "Failed to init power domain\n"); goto out_domain_unmap; } + if (!init_off) { + ret = pm_runtime_get_sync(domain->dev); + if (ret < 0) { + pm_runtime_put_noidle(domain->dev); + dev_err_probe(domain->dev, ret, "failed to power up bus domain\n"); + goto out_genpd_remove; + } + + if (domain->keep_clocks) { + ret = clk_bulk_prepare_enable(domain->num_clks, domain->clks); + if (ret) { + dev_err_probe(domain->dev, ret, "failed to enable clocks for domain: %s\n", + domain->genpd.name); + goto out_pm_put; + } + } + } + if (IS_ENABLED(CONFIG_LOCKDEP) && of_property_read_bool(domain->dev->of_node, "power-domains")) lockdep_set_subclass(&domain->genpd.mlock, 1); @@ -1368,11 +1389,17 @@ static int imx_pgc_domain_probe(struct platform_device *pdev) &domain->genpd); if (ret) { dev_err_probe(domain->dev, ret, "Failed to add genpd provider\n"); - goto out_genpd_remove; + goto out_clk_unprepare; } return 0; +out_clk_unprepare: + if (!init_off && domain->keep_clocks) + clk_bulk_disable_unprepare(domain->num_clks, domain->clks); +out_pm_put: + if (!init_off) + pm_runtime_put(domain->dev); out_genpd_remove: pm_genpd_remove(&domain->genpd); out_domain_unmap: From patchwork Tue Sep 3 15:31:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3407 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id B23D13F1F3 for ; Tue, 3 Sep 2024 17:32:06 +0200 (CEST) Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-428040f49f9sf50771575e9.0 for ; Tue, 03 Sep 2024 08:32:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1725377526; cv=pass; d=google.com; s=arc-20240605; b=g3GsdNRzFAuH4Ue7vzW4sw71bkcBOo51I8OBtYF6difMO6RrNvNT8qz0dWlT8ZslEl gxQ35CZ1rQ08yUF6NKpYf/YD+IQP9cdB78KcgXM7qzkuw7WTwxZEH4q/Zy5f7dNaReaU KrgWiara9j1CCzuNl7L7CknnofiD8S2etNMeP2sqkWMg6xnYJtdsKJkLOiTuVpesVT2L y1wS+TdhSSDrln0oycWPaolS6yot3fFmWQS21AlPa8sIWq7S9C41NkpkvpS4ldZifcai XvAKW7DgJkzDeug9NdnmpSo9LQeDG6VF/UgyYGp4LZ2C+TcGmMC5kl85ADN5LQzdsMdP Pilg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:to:from:dkim-signature; bh=IALQ0sBBnDCChC3p8U4CWOLf9EnTU9B6KmIspbG4Azw=; fh=Z3Rf++9T1E9aagR5Gxdk+S6qWhmsoL/lYXaOIr/PcDA=; b=Q7Y0S6EP0MecmPj5ezBMF14/8sEtbS3Opz0OK2AHccEhep5S9Hf2B4LxRro8i7ECAt hz5cEB9UJA5N8Xa8x2T7Z3NI/O18rBylIjqHU7QTo1n5GOKWfhIxcuiabSMWhi5EP+EC drimiZ5Ju43JDGVIVaPGlSCgxxQ8hRILm58wzwjles5xqcSdTTWaEArqnDsin9nZtTJR Ne8pi8/P5hEnHJNNIdLrGosDcIbxal34YUnJCcDLVTJrzhrNzR3Wz4/DM5TG9u0FxvD+ 3im3uSjp6lu1Hrd3MpvRJLY/+AYikDEG9HBRVYR007l5vbbARWyjigCJ5xpqaZB3zqm8 xJ/A==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ncdE0qXP; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1725377526; x=1725982326; darn=patchwork.amarulasolutions.com; 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:to:from:from:to:cc:subject:date:message-id:reply-to; bh=IALQ0sBBnDCChC3p8U4CWOLf9EnTU9B6KmIspbG4Azw=; b=Iecb4AvcRVcfYy9DQNTfdq5COf/2zEvsa+yRhXl2rOBl5UlVqaUvkycfVm4hLmDJDE ipgPqZxLFL6GyktCeBDWiIbbbwmPThZ4bZFZGOI5bFN8uLi20HVXf1wa1tFfgSRqqXCK oVlZ2eZtkDE8HpgD7VRParMRiNVD00DQZ65gA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725377526; x=1725982326; 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:to:from:x-beenthere :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=IALQ0sBBnDCChC3p8U4CWOLf9EnTU9B6KmIspbG4Azw=; b=oUil8zgmKwB/9oK+EFZhw9LlqO0aLdtIjtGGJjE6f9dYXXB89MKOaTv17E5FWzuPPT TJjHzh4xsDKzLNxYFw7qOeNdZ1L5Z5isGSeeGmJDarBKfNmoaAKYYn/lGWmonlvspkFz ATXeDKw4+z1EiWlmOY+XXFQhVBI/rm0dEjfgOGPfUr6dARxpt96z/5cO1Py20SKtqQaA nl6SiJU8ufi1bE+ymZCIQdVbqMo1PDUW2Sc7+RUQMw9fs7tR91FNbU6Y0Lr1xaWryLG0 9Fr6ejBH5zOyUs2bMfNwqOxAehrnuYGOc236Wcm4UPPhlIB8NGuWe0+96cmLbAHMSfxb 0Vew== X-Forwarded-Encrypted: i=2; AJvYcCXMrnu3YrPdFnMebWlHTRmQLTmu2+LBCigvAy97GGmXlVjoDPOzIWIez5pUt4rmPNLlpoq6xxrwFm4D8zq2@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YyZxUUdpkNpcALbLU//+L8HL7OK56x91/BQuvRz2aAo0/R7BC8O z7xX/FvzxyOZ4wHg7hq9bGmFmYnH3sqY2Hzux202iKvth7SMte6O+k9jneJ8dOStXw== X-Google-Smtp-Source: AGHT+IFhbzwQFA/jhXsxjuKbvkFaVLMLaGKidRx++SbPB3Nxco9MBk/HtSA2RqToxdc5SwPDUJmgWA== X-Received: by 2002:a05:600c:1f90:b0:429:dc88:7e65 with SMTP id 5b1f17b1804b1-42bb02ecb7emr131920175e9.12.1725377526295; Tue, 03 Sep 2024 08:32:06 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:600c:4ec6:b0:428:1007:62f6 with SMTP id 5b1f17b1804b1-42bb2a12028ls32459495e9.2.-pod-prod-08-eu; Tue, 03 Sep 2024 08:32:05 -0700 (PDT) X-Received: by 2002:a05:600c:1914:b0:426:8884:2c58 with SMTP id 5b1f17b1804b1-42bb02c10bemr150136425e9.4.1725377524813; Tue, 03 Sep 2024 08:32:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725377524; cv=none; d=google.com; s=arc-20160816; b=bmcOQgzaDlpaP9qK3XjA80Bja9AmxMbsGkuDBUIhIq5H7w0xFgegEG6zAjt0k/NxLt +CkbWZ4ry3PkPLnuA4Fu7u2BKrwSbcvGTaPrHD5YnXblPhe+E0+XqruxYFJKV5kzDaE1 zUtMnQSb78pr9Y+c8apOGkpSsNxoc/NW5QU71YI01gEdEGw4q+S6oXWKJulDmtQER4lx o0v9+RChVhjEfeTuDWUZJtPypcPmW+7FZr0wlIZeksMcNlm3Fz5IrFl2gIZviiKK+ZXq pkmZJEvwB9dBPDOefkUoGdrgZAVxOiU8iQyGVRIoaMaBfe/KGY8gUpY/I7EhZbGtipKY g4Vw== 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:to:from:dkim-signature; bh=L0OD9jL8YR+KiYTpNEU29Kv4SUYLBAcHzNdkWwMN8Q8=; fh=FtQepR0uNoeKT2PVdKfTKOkvEYfwbRmoVE9BmlYw3tk=; b=NmRye3v9lIfG5E+Y1xfefGbsS42zYkjtxawcpzdZpXj6yANhtu5W6BbJ9XDJ38agcn AhJbHi5pNsNNHy8v406MZ9O12hyZzphNpZT1nsGP9fVOBvizRotsbG2bCvhjk6AH3TJF UVsjiUc3fYp9XBgx8t/ULxRi/afj/epRwUxUwmyGKiAxZ+4N5hSs8PKXqB4T/60VEcE/ AbS1PUNpf91UHAPxRL2cpk+TTgXXig4DSlRSBkQT82Jei51tZotCFTnJSu6RW/FcHJsT NsMrhOpgGtJkornan14AX9WycG+tD5KXpsvjVc6l6383m7ciTVrX9V6Dv8NYI6fJgf2l eBEw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ncdE0qXP; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@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 5b1f17b1804b1-42bb70b39acsor46197835e9.12.2024.09.03.08.32.04 for (Google Transport Security); Tue, 03 Sep 2024 08:32:04 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a05:600c:5110:b0:42b:afe3:e9f4 with SMTP id 5b1f17b1804b1-42bb02c10b2mr135309485e9.3.1725377524024; Tue, 03 Sep 2024 08:32:04 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.42.65]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42baf1b0c18sm192963055e9.37.2024.09.03.08.32.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Sep 2024 08:32:03 -0700 (PDT) From: Dario Binacchi To: linux-amarula@amarulasolutions.com Subject: [PATCH 06/10] drm/panel: synaptics-r63353: don't re-activate the panel if already setup Date: Tue, 3 Sep 2024 17:31:53 +0200 Message-ID: <20240903153157.918185-6-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240903153157.918185-1-dario.binacchi@amarulasolutions.com> References: <20240903153157.918185-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ncdE0qXP; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@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: , The patch does not re-execute the hardware initialization/activation procedure for the panel if it is already operational. This feature is crucial when supporting the simple framebuffer, as the controller has already been initialized by the bootloader. Co-Developed-by: Michael Trimarchi Signed-off-by: Dario Binacchi --- drivers/gpu/drm/panel/panel-synaptics-r63353.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panel/panel-synaptics-r63353.c b/drivers/gpu/drm/panel/panel-synaptics-r63353.c index 169c629746c7..93e3ed545b34 100644 --- a/drivers/gpu/drm/panel/panel-synaptics-r63353.c +++ b/drivers/gpu/drm/panel/panel-synaptics-r63353.c @@ -258,6 +258,8 @@ static int r63353_panel_probe(struct mipi_dsi_device *dsi) int ret = 0; struct device *dev = &dsi->dev; struct r63353_panel *panel; + bool initialized; + enum gpiod_flags rflags; panel = devm_kzalloc(&dsi->dev, sizeof(*panel), GFP_KERNEL); if (!panel) @@ -282,7 +284,9 @@ static int r63353_panel_probe(struct mipi_dsi_device *dsi) if (IS_ERR(panel->avdd)) return PTR_ERR(panel->avdd); - panel->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW); + initialized = of_property_read_bool(dev->of_node, "syna,boot-on"); + rflags = initialized ? GPIOD_ASIS : GPIOD_OUT_LOW; + panel->reset_gpio = devm_gpiod_get(dev, "reset", rflags); if (IS_ERR(panel->reset_gpio)) { dev_err(dev, "failed to get RESET GPIO\n"); return PTR_ERR(panel->reset_gpio); @@ -297,6 +301,10 @@ static int r63353_panel_probe(struct mipi_dsi_device *dsi) return ret; drm_panel_add(&panel->base); + if (initialized) { + r63353_panel_power_on(panel); + panel->base.prepared = true; + } ret = mipi_dsi_attach(dsi); if (ret < 0) { From patchwork Tue Sep 3 15:31:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3408 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id AC05E3FA49 for ; Tue, 3 Sep 2024 17:32:07 +0200 (CEST) Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-42c7b39e953sf16169115e9.0 for ; Tue, 03 Sep 2024 08:32:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1725377527; cv=pass; d=google.com; s=arc-20240605; b=Qdk01Vhy+jR3wiWbeOBOyBLz26xHEIEFi6B+AVvCPTrZIuutT4nMp1EZuqJSXRxcdT ae6G58L/zakxO6JSl51PmD9uzGS3FGTGpGIEWyTuL3qXj7bRYg9oAE7IQppSjeZvik6s VUL4ejwU5QpXtomzj8rTCkn6oqzbaqPo44v9t2c4CCXXwE8XhGoUWyYJmVXeBhO05KE3 2iA5rFJBUEUV4GnMJ5bP+t/YKuh8xI+WOXN28Ab2vvN90Q5C6Ll0Pu4KPi6W7lkZn+P5 lZYfT/lR7/9X+lZjAesX7roX00PDRgAH/M8y//QC+X+0YKjxUjEjSb2mFQvYnLUoJvvq 0hgQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:to:from:dkim-signature; bh=erq75h9BPaWfOzVj4ES1EdAF8vaVJL0kqZxVXpr4rG8=; fh=HixIfLf0TVkrRStkYI24rfZngZD5OMcBqB5Y+zhBDu8=; b=BcFPoTmfKgBQZESfhdKcMPk6o4PjPdsRSQ7vGwqv3qSVSMMD4SQqkKCIvfhibFT4RF NYZG5Qv9HF77+JH9Hou531RfOz+Bb7wwNccUQxrhk7k1JwixdZ2Ki/4txFTM3fCg9FUK KO7cp8ZkqJuppMBBBAKRwOb/h7YoDyKJlvbGO26NbpDk5j+xoqfUCRYPS9hwYMCbgwiW l6GyZxsvQUY6tHGwpaaYTyqcGddcKY0Ht5ZhaivYtv1tquPG5Xld/AiltRVQ1AgqoRpI k+X/hI15ySK3rHdr/k2WIPLfeaOAszpXabI7UtZ2BNhodaX+GoZXeRw/ls9FmCgL2cSq isDg==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=A6bEQQdY; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1725377527; x=1725982327; darn=patchwork.amarulasolutions.com; 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:to:from:from:to:cc:subject:date:message-id:reply-to; bh=erq75h9BPaWfOzVj4ES1EdAF8vaVJL0kqZxVXpr4rG8=; b=I5VSYj+2+/yC9P3qwqyabi5LU2Ym2blx7KJ+mg7C4492wCvpEQQhVx36+X34xXmckV RVhPHb8bQ06xW4164Ktjx7klhkC9ADeVaZoFPPRIxPUb0HeC+HCxwyJkUcPrur+TPwMz 6xw9CFaiJlNW9EHgwkSbGbWDFP1aOk7SEU/44= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725377527; x=1725982327; 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:to:from:x-beenthere :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=erq75h9BPaWfOzVj4ES1EdAF8vaVJL0kqZxVXpr4rG8=; b=u8dG6E/S8jKCRDJmqNhGuh6AUwTJkOdeExWEfyvopLeXzalXL/gq2qD10JhcbNPS74 bAOPiBP9CjQexcqOtXib09/vXrsmuURv4+Ld2RAUOxrQs3vZJGCzg8vAuLuj0lPlD6uv uSlvjFrssW4vaVRoW0CupHX8CaqNSveRs6ZCxnr6A/dq7ymGmR6vu2FD5oHDLaygE7Fu HXTAcOEWKb4UVmekT7DeuorwiAE77IiSV7X6/FnOWBHfltsiFoyCp02e0Re3fE6+GQoW zzlq5GuEfXOLuXbdbTdbm1GiN8fSC8C4mMZ+nbJQRt+/bjyqEWOooldGiSkW9TRy/zBL hHng== X-Forwarded-Encrypted: i=2; AJvYcCVtqFFGA+4aPNtiwXJynJWMCMbTBzbZsCSVaRVRZg+nZ0HFtPzvXL7eAAlXwVvCqzFHwcVROs2GXnAL+cqu@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0Yyj1Np5D5V+ArixvjCmmq7GLBZD+MOr1XmnPTktvLlgp4JHu9GN B5MeRbGKGduYYmP50OzDSftOUSM/6ySQMZZ1Jemf7eZ6NWGs2zIakRIw/G34t6Is2g== X-Google-Smtp-Source: AGHT+IHLNFTchPSujKVt88YZDHc88dgt4nWzXvHegU/DVMgRcSaPX+HiG7d+7zTf2zag9uOqPv2TQA== X-Received: by 2002:a05:600c:3ca9:b0:424:71f7:77f2 with SMTP id 5b1f17b1804b1-42bb4e9f1a9mr111866475e9.16.1725377527261; Tue, 03 Sep 2024 08:32:07 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:600c:2d06:b0:42b:b4f2:862c with SMTP id 5b1f17b1804b1-42bb4f287f9ls12005435e9.2.-pod-prod-00-eu-canary; Tue, 03 Sep 2024 08:32:06 -0700 (PDT) X-Received: by 2002:a5d:6190:0:b0:374:c7cd:8818 with SMTP id ffacd0b85a97d-374c7cd8a12mr4855521f8f.22.1725377525650; Tue, 03 Sep 2024 08:32:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725377525; cv=none; d=google.com; s=arc-20160816; b=lGyKhYgoUleYx2AcdQJadRAybC79LCBsX0OpDfQWSLNAJx9sAUYRb5B3gAV35l5bjb 9nd3tK81/GIRjeQRKm+ImFg4MftpnSXJDmJzzRsrPHqjX2KW0F2hDjpRqi6M99lceUiI zwOendJjS59quc+0D1SD5JNW8QjhdvRkl97oGkG42MRzAF3XHJ4F7JrZ9TCw9Cukpi/y iUgOjS7SGOOM7Vy9eBjxl2lrO1lM6AJiwiybfusN2avzqHqpC4tKcWJiuvb5bjyZMAqB 7IcyR2qykwVR0WUEqQhCwCY6WnkuSOrr8rZPQ3/E5zp2JAV8vT48oyg2jzMBICTdLq0Y /W4g== 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:to:from:dkim-signature; bh=886dheCSQMH5QLZJoUq/AcWn8+XxfzrNMN/ystOgZrA=; fh=FtQepR0uNoeKT2PVdKfTKOkvEYfwbRmoVE9BmlYw3tk=; b=ajXnZtEbXEu+LzfRe81Vfw7Eue6Kd4zenYqF+/Nqh5yvOTyGWupMiM6NwpURo07Cuu OsvTScN24pHH2ePfHoGNoCxp9JgvlHZ7wJzFtqVWioSb0oO0N5tGPxMMHV0JnzVilcWk yXju1YiLqMKjEImA/P5f88oUINqN5xrLvyJVEvODlUyrxXouTLrn1aGv4ZBZEnpIlc6p 7RxyQG9kgt0Yqs0YcYn+AkYzKrEAmZck7DpEIXtpLVNVYWXW/64wzZxmfNesIr8QLEAG +Swq3+dWu2HKc4skpw/jw8YuOZrB9ei0WvM6KJFwe7xhM850TEjvyF9nFa0xzfbHtFsb R2sQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=A6bEQQdY; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@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 ffacd0b85a97d-374b9abd1c2sor2161043f8f.5.2024.09.03.08.32.05 for (Google Transport Security); Tue, 03 Sep 2024 08:32:05 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a05:6000:543:b0:36b:c65c:661e with SMTP id ffacd0b85a97d-3749c1cdf6amr11070489f8f.13.1725377524893; Tue, 03 Sep 2024 08:32:04 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.42.65]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42baf1b0c18sm192963055e9.37.2024.09.03.08.32.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Sep 2024 08:32:04 -0700 (PDT) From: Dario Binacchi To: linux-amarula@amarulasolutions.com Subject: [PATCH 07/10] drm: bridge: samsung-dsim: don't re-activate the bridge if already setup Date: Tue, 3 Sep 2024 17:31:54 +0200 Message-ID: <20240903153157.918185-7-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240903153157.918185-1-dario.binacchi@amarulasolutions.com> References: <20240903153157.918185-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=A6bEQQdY; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@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: , The patch does not re-execute the hardware initialization/activation procedure for the bridge if it is already operational. This feature is crucial when supporting the simple framebuffer, as the controller has already been initialized by the bootloader. Co-Developed-by: Michael Trimarchi Signed-off-by: Dario Binacchi --- drivers/gpu/drm/bridge/samsung-dsim.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/samsung-dsim.c b/drivers/gpu/drm/bridge/samsung-dsim.c index 95fedc68b0ae..bcf1746bfb6b 100644 --- a/drivers/gpu/drm/bridge/samsung-dsim.c +++ b/drivers/gpu/drm/bridge/samsung-dsim.c @@ -1912,6 +1912,7 @@ int samsung_dsim_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct samsung_dsim *dsi; + bool initialized; int ret, i; dsi = devm_kzalloc(dev, sizeof(*dsi), GFP_KERNEL); @@ -1989,6 +1990,13 @@ int samsung_dsim_probe(struct platform_device *pdev) dsi->bridge.funcs = &samsung_dsim_bridge_funcs; dsi->bridge.of_node = dev->of_node; dsi->bridge.type = DRM_MODE_CONNECTOR_DSI; + initialized = of_property_read_bool(dev->of_node, "samsung,boot-on"); + if (initialized) { + dsi->state = DSIM_STATE_INITIALIZED | DSIM_STATE_ENABLED; + ret = pm_runtime_resume_and_get(dev); + if (ret) + goto err_disable_runtime; + } /* DE_LOW: i.MX8M Mini/Nano LCDIF-DSIM glue logic inverts HS/VS/DE */ if (dsi->plat_data->hw_type == DSIM_TYPE_IMX8MM) @@ -1999,11 +2007,14 @@ int samsung_dsim_probe(struct platform_device *pdev) if (dsi->plat_data->host_ops && dsi->plat_data->host_ops->register_host) { ret = dsi->plat_data->host_ops->register_host(dsi); if (ret) - goto err_disable_runtime; + goto err_put_runtime; } return 0; +err_put_runtime: + if (initialized) + pm_runtime_put_sync(dev); err_disable_runtime: pm_runtime_disable(dev); From patchwork Tue Sep 3 15:31:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3409 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 100193F360 for ; Tue, 3 Sep 2024 17:32:09 +0200 (CEST) Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-374ba33b2d2sf2497943f8f.2 for ; Tue, 03 Sep 2024 08:32:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1725377528; cv=pass; d=google.com; s=arc-20240605; b=lhuGK4B9N6n481T6scXNzqpaUE0X9LuwrQSXkMpGAzIPyM82HWBAGgX6o8odN/g9Td zq0IhKGSOced4ODc+B2y8t5GWhj+KZDjfMJORZd7EHsTMvLilMXZ5K6a70DsK3vOIx6S g24H99bEDmPpb2D4bU0CktPezDWTASSepkAvTnspZ4T1UDUTdJ4XixKU9zaB00fk2qqj zv+epe98ndPkc7UYwaKT7Hz7XmzCD9idAFZ2cEb3aW4SZvDBJcPq0aHhmAMc2KtUBmh+ xynhSxKY6dKhnTdrbo+e+JQhwanCRBs4KNfpj9EvBXcmFLnJfrfHHTHPlBm47fpiUDXG CBGw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:to:from:dkim-signature; bh=kVSb9S15fHc8hmsibCg3dCN36cQBTY+IOTntsTNVY24=; fh=rGfPCzEsW55FXHHNgC5dtPPygyrMknaJONDPsUqOFr8=; b=fGOYl94NO7thNKu/MkunXFLA56Nr+9FoHIecWDIB7vI6INdWjtbz1ezUJ8NXRoYujp NzuqwaMkdSwj91t4WitovNo25hTm0uvtPP07tf1bmBpte8RNONqEa2gpc2I74zhOYlbP jqrEiffUWaM6DMVC/7+zV+aVp8gO92IH7HCxvR4V308iY3VEZ3j7Z3OP0TaOCrOlGoIq Cgg73vupdI+jIUmWfcgTS/VZJ9jj8NB0YqEoVFbbn/KwUVFhYXiE2+kYz1WiNR13JYuw I6lIPk9r/HENL92IrN7FVvD/9y59X+0OxVeQWL6rMbzHjkb2K4vzMYwUZEwoZaToIiA9 9XIQ==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=E3ztCHBD; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1725377528; x=1725982328; darn=patchwork.amarulasolutions.com; 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:to:from:from:to:cc:subject:date:message-id:reply-to; bh=kVSb9S15fHc8hmsibCg3dCN36cQBTY+IOTntsTNVY24=; b=j5RIU+UCZu+XS928oJsaekSfw29bDIgtXW3vp1iOcNxjcvcArBX+6YQncDbaZtCawa eaXnOwoT+nt5IlCggZ7lA9mGNA9T+mY5qU/qRc2sjIGozjbCDi/Hhnp2Ppo8nyvLCnrt RZsV4mmXxc4Gr44tJ89SaskhV497X6nWNcsEU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725377528; x=1725982328; 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:to:from:x-beenthere :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=kVSb9S15fHc8hmsibCg3dCN36cQBTY+IOTntsTNVY24=; b=Mzhkh8hC585PSe4j+HIjeYLbKol+lCKCowfPW3ogI/QcqNPTgkQk+X4IMAMyK2zQrn SgBBP+ulsHbYl8sitHs04BZfQriW+afB8iRca9AWEGbRYdcEqC8PJlVsg5Wqvgv7vuUu zxZmkHtRnzxkJ30xRTe7wFentFTm/2bQfgR8CEtTxyPf0C7NxuuHsm+NhbvfT5UDGfyr fObS8HHDvTycxMQFEYZDcOKKd+f9rNnQFohA+lNF8z7+/qo/qOrmCzx44w28u01wCDqb HXLfkSj1IA1IqHT7xSdcNTpTwErHrTnU5qDROQdgH551u7IXNZn40ZPH7RQomUxDh5E5 DahA== X-Forwarded-Encrypted: i=2; AJvYcCXm3nNdKyx7F+NAdyBgQFyoOSMUPVEnsU5/RtRBnIXPSTuSUDS7AYeGp6IDbuvHPDdKrQHQhA6sGG3HiAw2@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YwrA2hhCmPQhtO9szxJJE6vVVlfkMDZMnjWurkzJGoyuTpygCud AJzrtxlrjQJpbj/JiDXhNpxL/1zHgMM83zs+bBmqLV0UBoh3+fAR+S6SqU7jgHNPxg== X-Google-Smtp-Source: AGHT+IFj8/5xNepoRfkQ3fM9bC0wIwAJzzCbQq5SHKC+9i4HcgsW5QL7OQ+5eUm3YSeExOGHP1xEHw== X-Received: by 2002:adf:ef44:0:b0:374:c6b8:50bd with SMTP id ffacd0b85a97d-374ecc67374mr2618555f8f.8.1725377528319; Tue, 03 Sep 2024 08:32:08 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6000:1faf:b0:374:d287:ec15 with SMTP id ffacd0b85a97d-374d287eca1ls575066f8f.1.-pod-prod-03-eu; Tue, 03 Sep 2024 08:32:07 -0700 (PDT) X-Received: by 2002:adf:9b93:0:b0:374:badf:966f with SMTP id ffacd0b85a97d-374ecc67b7fmr2644378f8f.7.1725377526575; Tue, 03 Sep 2024 08:32:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725377526; cv=none; d=google.com; s=arc-20160816; b=oWs/HTHGNBFWE2vXon1m286T18r3XYbIekIK3W87ldYK1KqlsWECqv+7wnQYGp8KZt CYeMLeJsRRLcHxuOAgZWkuGKShnlorfhTgOzoFwZy3DvXITDD3B6BgR6IzOJlEJz+eHX RtKCBMzvQf/NrDcTiMXJESDLyJ5LTjBuzpFcztrAKzLOzNj6a4saQiw+ybsFixUl59Mk 8f0XBeaBPtnNXkgu1YUSjMDoY399JSQPnaEJv54nFuOexNDRLWb9QPx4hjTsJ4oLxnpR 1Agtk49Wj126hUF44HYiS2xU97uQ50Wqjsi3wrRlIRBEL7yR2BLsUQaeLvNVgWxLxj7Y 7cCA== 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:to:from:dkim-signature; bh=WV3iH0/t9gF1v66Va23JN+U7ZtAwGtNkbC0B7QxXY4I=; fh=FtQepR0uNoeKT2PVdKfTKOkvEYfwbRmoVE9BmlYw3tk=; b=GBFw+KrxS2DI4WUoof+Q5oxLW7oYM+sh7uhwOFV/EkCLGi37gshRaUzAJR//rs2Ve1 iZbTo6OG2JehD8s7Wi/5vRc7yBQ54hTGByxFAY3e66SpKyKsOP5f2UpRd3WpDKYWQ0Sc Syi3GEYnyLV7nmjnTBiXfCmH6H/t9yLKDDTuy2MmwQTlqyxMf70DkDWXDqkkSi3/3to7 aC741f/dtCL75IME647tQGR94OCTKPDWMEFL6IS6YCrsU/rElzwZa5yjOERjnPN3e7Zi nqDZTJXwLCXB4NGvLdtkI+kbyr0Z873gAlUJoucIUEa9e5oNULXfXeVNVg3UhZcvUkGj 5UyA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=E3ztCHBD; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@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 5b1f17b1804b1-42bb70af19asor47053155e9.11.2024.09.03.08.32.06 for (Google Transport Security); Tue, 03 Sep 2024 08:32:06 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a05:600c:4f46:b0:428:1eff:78ec with SMTP id 5b1f17b1804b1-42c880f3fe2mr33108155e9.18.1725377525752; Tue, 03 Sep 2024 08:32:05 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.42.65]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42baf1b0c18sm192963055e9.37.2024.09.03.08.32.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Sep 2024 08:32:05 -0700 (PDT) From: Dario Binacchi To: linux-amarula@amarulasolutions.com Subject: [PATCH 08/10] drm/mxsfb: Remove generic DRM drivers in probe function Date: Tue, 3 Sep 2024 17:31:55 +0200 Message-ID: <20240903153157.918185-8-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240903153157.918185-1-dario.binacchi@amarulasolutions.com> References: <20240903153157.918185-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=E3ztCHBD; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@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: , Use aperture helpers to remove all generic graphics drivers before loading mxsfb. Makes mxsfb compatible with simpledrm. Co-Developed-by: Michael Trimarchi Signed-off-by: Dario Binacchi --- drivers/gpu/drm/mxsfb/mxsfb_drv.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.c b/drivers/gpu/drm/mxsfb/mxsfb_drv.c index cb5ce4e81fc7..1d8dcfd629e1 100644 --- a/drivers/gpu/drm/mxsfb/mxsfb_drv.c +++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.c @@ -17,6 +17,7 @@ #include #include +#include #include #include #include @@ -352,6 +353,15 @@ static int mxsfb_probe(struct platform_device *pdev) struct drm_device *drm; int ret; + /* + * Remove early framebuffers (ie. simplefb). The framebuffer can be + * located anywhere in RAM + */ + ret = drm_aperture_remove_framebuffers(&mxsfb_driver); + if (ret) + return dev_err_probe(&pdev->dev, ret, + "can't kick out existing framebuffers\n"); + drm = drm_dev_alloc(&mxsfb_driver, &pdev->dev); if (IS_ERR(drm)) return PTR_ERR(drm); From patchwork Tue Sep 3 15:31:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3410 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 0B8383FA4F for ; Tue, 3 Sep 2024 17:32:10 +0200 (CEST) Received: by mail-lf1-f71.google.com with SMTP id 2adb3069b0e04-5334824e68dsf1144722e87.3 for ; Tue, 03 Sep 2024 08:32:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1725377529; cv=pass; d=google.com; s=arc-20240605; b=avv2o2NrGj13c4yVkjtUWH7QuMoBtPVbzov0vqe+W2xyAyZ20zWCFVw56FMOxei0Kc I9bZ7Podq5ATcYxkKy2TaaB5zzh2jxN4Z8arEytA1N0WuM3hBixeG30pqbt0FsaZS1kc AZ0MgYjdBK0Mvj2M2JQpAVMirs0AuQiZCI75cWwjGYXpPA3yD3oJ8K9V4+AKBlFkXSzN uz+WqZBemayPc6CIEMbgswnSHQlZrplq1hRxqFQoN98KN+AggeX0AhqxXzdaph2b0dPk qBo5iDX231KfofeXT0OI5PVmoygu9ecKPMGNOYesDlOKnPMRNftL1WdwbopyDmQh1yjh 6Z/g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:to:from:dkim-signature; bh=CJ4AHtpjLb1+Y8x3XWWy8Iyzwd89nxd2uPsYjnu7mV8=; fh=b9qQalrbzJ9gW6XuHOVMLovmaeTdmALwUmypWw5ysN8=; b=CA3XdQsar8H2uxxbm8k3ViloBPh+Pb/3exYG9tqbn2Drw5dC3ge7HAj8HdlxuAYv99 8DG+q+ecHLE3lSKPcOTrZO7b/RDs3svUiLibrnKsXsVomBENvoYE60fk8mfprjd/vSP/ eRk1XIjlXfqe6446fxAMY7APzg280QS5NaN7Ov9VIdcOVc4LopRQnFnNFke3YCdSkrDd hN8PLq69d3/yKqgt6HvUlvpLLN8B6TnKNuTx1HFfUUolViWfq7/6pJsygTADLspirc0Z Cr7OOg90V5+/m0dO8IlQOpZvgJj0RcijySTTQ2SyLWPLOL3IUtQzLU6+8UlJnwm1V1cq wTfQ==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=mQTC0Wy8; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1725377529; x=1725982329; darn=patchwork.amarulasolutions.com; 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:to:from:from:to:cc:subject:date:message-id:reply-to; bh=CJ4AHtpjLb1+Y8x3XWWy8Iyzwd89nxd2uPsYjnu7mV8=; b=PLmynFQyaaS2qzQxExGgtKgBIHPY2HGx7cms+8RjeoYMN+VOwjhkeupsN6PfLEitwA 7E1gVi/7Wcm9JP+0VmsMeAsz9+pHt4IHEoRxvQXUYz0C7ID1jWlEhn9IZKPlykpjv41u y8pktndJsQJsxo/NMkiPRh53mY5tTo+QAka98= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725377529; x=1725982329; 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:to:from:x-beenthere :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=CJ4AHtpjLb1+Y8x3XWWy8Iyzwd89nxd2uPsYjnu7mV8=; b=UqQElnZR2j0jD/HvE9bEoRFAbPMYd54ofAzprml1XtWHVijivetSc8077r5W1ltfHh 57R7wawVugpyy5O8Huis7NAJHyq2JKFhhMCyBVCNXDh4EsP3DwRDymvCCWP/9V0VpF5u poWFu6+3ZtWUSTQnObd355AyAJ4YvWW2L2jGiFS/oZE8rmwXrQq82jF/DG9zzxpC8T1j RnxRYxS+SU0sW9Ls4O7cKXRVvuJwaj29U5YKecXd5JBlXRoRvHkTjoNEDx0qmtV3l1M+ vv+nilZsfCbvk5yhOsYPsGgO6KoKrRMX3byWHTaFekEwLr31KDamSWznQcMJFyL3AG56 td2w== X-Forwarded-Encrypted: i=2; AJvYcCW9/R6BtwKmCjY6NzCE9bZsgdMGiBSWtxFEpt8yZU6eMWfogAvUZu3EOnoSmFOrMAbZHNJzPxWyHb4FtQkI@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YxViPwUCS4CRuNjsntVGMnL0uM+eQe7sxoHlMPzxnk0kg6vbJuF b7kzHvbOzxVK3g18su2kf5Eancs/b0Dpmt2CKFvOV2DMs0xwSUrjaV8CSgdmrkTu7A== X-Google-Smtp-Source: AGHT+IH6XK7+ju//KuOYRkoDtDuMTXzBpAR463/AcXJN9s7aoN8h2E8XOLcko2x2i2N6l765pvwH2w== X-Received: by 2002:a05:6512:3f0a:b0:534:5453:ecda with SMTP id 2adb3069b0e04-53546b048f8mr9548767e87.23.1725377529235; Tue, 03 Sep 2024 08:32:09 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6512:238d:b0:52e:9d2f:234 with SMTP id 2adb3069b0e04-5353d641f19ls209219e87.0.-pod-prod-06-eu; Tue, 03 Sep 2024 08:32:07 -0700 (PDT) X-Received: by 2002:a05:6512:3194:b0:52c:9e82:a971 with SMTP id 2adb3069b0e04-53546af527emr8927053e87.7.1725377527466; Tue, 03 Sep 2024 08:32:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725377527; cv=none; d=google.com; s=arc-20160816; b=W05OqdlBjlD0rb98pKzE7MJAt7PT7KwoVjoaDDa8HKfrA8NZqzftaAcj5K3VNM1ZuE YvVzKElZfCrQMOFNStox8Vj4UrLZl8oRrhV2zc0y8ICUiXEe/8tEkzN7gbhhSQlE0k0/ vzL8v5pdAJG6MwVoyBfgTnI7kSe4m/JD0BuLtzNfUe8oxoFya+HYzBHkdbMBUoQlo1sj Dr0P7M1+dTZAbgk3pgqGaOuLmjpR/FQEar69AE0g/frnbzCvLMyO4GhXGKfIMOKE3wGC Wq5nw2IJMo4zXXpjYffNLQL9pfSAoh9JycD+NFbhJG+efx0SThIuWCS52ewUZJW1dO6s vPkA== 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:to:from:dkim-signature; bh=xNM0uEOJzGYGaDc3AkqMrexBEngOsofp+apFwjQz1uM=; fh=FtQepR0uNoeKT2PVdKfTKOkvEYfwbRmoVE9BmlYw3tk=; b=r8f6pxCQyq+NY5v+OXxXtxMPXd+xX6yu0C5p1YI7+o1mlThruE/p9IHRXT4y1woAJO D5P4iWh1J9TBeNJWjYYCubRPMcv/uuOWkKDoE6ejpRL+9F5+4DUvsteUeGweUib5PHqt XQW73NTzl/EyTi5xe8L58CMlzdxkznh+JDOsRZUO2ATzWXI3Rn8jXTJ7riAPPIqp7oDZ +NpjSzvCeZloUFHXgfKuo6K+lE8BB9qRShlZZxkiat1HFZC1K6U8yg+GkhTWXPUbzJCh KIgJ0eB0zBt10X9cuepelE78FEP/cbQ1+6vOBlIW7jFUuPivtvHm5/fFFTJnU8KcREXY EUAw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=mQTC0Wy8; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@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 2adb3069b0e04-5354076e6e5sor3422854e87.4.2024.09.03.08.32.07 for (Google Transport Security); Tue, 03 Sep 2024 08:32:07 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a05:6512:2383:b0:52c:9468:c991 with SMTP id 2adb3069b0e04-53546b03ffamr9394377e87.14.1725377526533; Tue, 03 Sep 2024 08:32:06 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.42.65]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42baf1b0c18sm192963055e9.37.2024.09.03.08.32.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Sep 2024 08:32:06 -0700 (PDT) From: Dario Binacchi To: linux-amarula@amarulasolutions.com Subject: [PATCH 09/10] drm/panel: synaptics-r63353: Fix regulator unbalance Date: Tue, 3 Sep 2024 17:31:56 +0200 Message-ID: <20240903153157.918185-9-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240903153157.918185-1-dario.binacchi@amarulasolutions.com> References: <20240903153157.918185-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=mQTC0Wy8; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@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: Michael Trimarchi The shutdown function can be called when the display is already unprepared. For example during reboot this trigger a kernel backlog. Calling the drm_panel_unprepare, allow us to avoid to trigger the kernel warning. Tested-by: Dario Binacchi Signed-off-by: Michael Trimarchi --- drivers/gpu/drm/panel/panel-synaptics-r63353.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panel/panel-synaptics-r63353.c b/drivers/gpu/drm/panel/panel-synaptics-r63353.c index 93e3ed545b34..765693d78206 100644 --- a/drivers/gpu/drm/panel/panel-synaptics-r63353.c +++ b/drivers/gpu/drm/panel/panel-synaptics-r63353.c @@ -333,7 +333,7 @@ static void r63353_panel_shutdown(struct mipi_dsi_device *dsi) { struct r63353_panel *rpanel = mipi_dsi_get_drvdata(dsi); - r63353_panel_unprepare(&rpanel->base); + drm_panel_unprepare(&rpanel->base); } static const struct r63353_desc sharp_ls068b3sx02_data = { From patchwork Tue Sep 3 15:31:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3411 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-lf1-f70.google.com (mail-lf1-f70.google.com [209.85.167.70]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 61F823F228 for ; Tue, 3 Sep 2024 17:32:10 +0200 (CEST) Received: by mail-lf1-f70.google.com with SMTP id 2adb3069b0e04-53341ed074dsf4504072e87.0 for ; Tue, 03 Sep 2024 08:32:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1725377530; cv=pass; d=google.com; s=arc-20240605; b=GLKWeHWxtPNmTnBcAIGlOVMZCEgQ/ZfM/ekkwPAdVFBUTzQsQZ0SpcRZ06+BOxWiSZ bJkDs7wq0OusBb1UOpGQGqjWS4gINNz1Tks+hjNvDyB7jqAjdx3jV85LylWetDDDiVCV jMlOYMxPVuWmBZc3A5EmNI6yqaM+MQsNqk5L9jwQt1EOQWkYLwII4FF4oJZqRxdktAGv AOZdv8gLXXc3XQS7Un0wB0MgGibXS1tFBEWV6LHfrfVsBkp707SyF6e008SVmEYgEGk9 1N8VY7x40gJ/5PueEvWVFS1i7+WJvTcPJ5qfNfAeAG22p91/HP4htn1BziE2jJlCtfEl Itxg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:to:from:dkim-signature; bh=0jft7jo+HXDb2ADjz6VuaiX8peINmMFdwJgyB7iJbeg=; fh=A91S+IZDi9N4xJlp9cEvL4jXkDOWSe8woRqigL1H020=; b=eV5U7WfEjJRD0/cxCjuOJ+BOueFvenWF88iH1hd8NLTG7uzqmMPXKHin2bJR2b44E6 1PK0x1LTEVwVGaMDuYXXKHmVEVZxMLrhlLJYr6ylI1mtWSIpB9aSKnVfUTWj1LO4P9Up q/qTlR2RjzEpXHW3KOZ6PYPRCVbsWpSxi+nG2/07BXx0oc1Sk31+q2KFHeeAqyb798MP afunJLrVggz7oCPZwwBsf99nltHJeFBMtH4VIdyHc+vVw4lXKgK8st/5CHJs2y4/kcFL C5OS/eYbOQdHGVMg23bC01JwVXM1Ciu7vdJyOU1mLhmZYnuwYO5Uj12yVPKSCBUXZAmT Au5A==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=RWd8ZSrF; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1725377530; x=1725982330; darn=patchwork.amarulasolutions.com; 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:to:from:from:to:cc:subject:date:message-id:reply-to; bh=0jft7jo+HXDb2ADjz6VuaiX8peINmMFdwJgyB7iJbeg=; b=XrWu1GY773fLUdgiVxX18o5oXyHd8GYh5Y7nlcmCoPJLJpQYPxpylYgvICyUUlJO10 p+hoyM/C40eQPRAOoF/rGBznmH7Q7MI8znuaI1AJaUiZ9JpOnhU2qZaerHHPK49vXvCq rGsiJdMAyJj6W+1zA6ea2tzyhjxA3QQpsEXzY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725377530; x=1725982330; 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:to:from:x-beenthere :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=0jft7jo+HXDb2ADjz6VuaiX8peINmMFdwJgyB7iJbeg=; b=o6vglSBL0BGeAtG9bJ+IpLXFmX+zP698JXEgkPyJBVq8ODVKuTFtGKjN1Ic7xl4lVg W95x1YYzZLVaE6b7xzWAmCezPBdmC67KW8rZOPJvNgWy2Jgx6IjxvYFfDpFHh1VyZfxN j1gahVimGF5F181Stcbpr9dKbA2TuFkqbRTQOPnekZ5Ha9pb50AyKwYDZfuZj8r4pL7v RtH/gnSp0oxvV+CYjC5flRbA+K97LAcEVNrGyj6GsAx/gIY/TH8EaOnyhwzYX12sVZ9Q MefR6Rg/yHqDDgtL5BrfsjL725s2pjEktf3ED9ui7xUvSQ0PJp9ohyhXSkqaLXUKPatX pEng== X-Forwarded-Encrypted: i=2; AJvYcCWZbYWp50fNnGmQb8uUfzHhzHMwSGwWP2fHYD6G1eNJgcNAuGjQkc33C9hQLay7Ggc2EaRiYm8FylEHhwyX@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YwO7hoMP5yMyeFBMunHmgD1pXU2VL0p37R/lQ5dhix7YEZhNhEb h3LL0EoXAw+q57wMeXZYe9C0RejpOgd1C8rRYYLjPo+F95eoLvsFC1g60V2MBAihzg== X-Google-Smtp-Source: AGHT+IF7MrNdzYA5prw7rx+U1pjwBK5ETjdRqEBFc8If7H9XtHgIwJEKwykvTO9A6ovFcdIxqUjbnQ== X-Received: by 2002:a05:6512:b1b:b0:52e:7ef1:7c6e with SMTP id 2adb3069b0e04-53546ba8dcemr10342211e87.51.1725377529725; Tue, 03 Sep 2024 08:32:09 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6512:ac1:b0:52e:9923:a1c2 with SMTP id 2adb3069b0e04-5353d71b5efls703650e87.1.-pod-prod-03-eu; Tue, 03 Sep 2024 08:32:08 -0700 (PDT) X-Received: by 2002:a05:6512:4011:b0:52c:8df9:2e6f with SMTP id 2adb3069b0e04-53546b8d860mr9826048e87.42.1725377528061; Tue, 03 Sep 2024 08:32:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725377528; cv=none; d=google.com; s=arc-20160816; b=0tr8mdeRvntkgK0rfa5MagEuveWWmkDinQJQH22IQCYnu5WLBESIbmsIKLtKD16vnw RsEurf78XeDzpDDXErBLwF6bUSLFdvUeQrqq3UPC1o+qEnGAYUZRGuiDF/yMLOQoWgas 3GDiIeRoVGWKmVrE13aN/tEnookpn+ohtHGRtIQ/hJfGcdqi9dz+fbLWjvASVKf15Vh3 onkhYvEOhQl8DrUpaPfWPOg+okQvE4JnaTEoMmtqXomRkzb9r8ekyXyxz2wvRRki6OvL 8/25HYuxUZzf9S/vySFSxj0iP/WuodZvXnqIRdExYAmHirCO1OLADk2XVnXmAZuZXDfz eOaQ== 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:to:from:dkim-signature; bh=RWJPfLCxbl6+QjQBWhBo1ziXJWqUMrvYN9J9zHLb7L8=; fh=FtQepR0uNoeKT2PVdKfTKOkvEYfwbRmoVE9BmlYw3tk=; b=IWbNYX4ZdvT92rWm9lNB7Pn7w3Q8JdAynBTMIna6NsDTkIXMw4tHLqFK7YENK1CBom wcDpU6o8mWuxZg0NjeS2T/sQBS3UBSOIiQ/1vg5X/RBCbm4rfueHqEKmNMYBNV1X0+YW MslHmRxfHs4ySumEz71ggO3IADiA+R76+rW/a5l7uHzRcfPL0BF2nLEO9BywnbMAoCCK y3OrJNJ+Qhzk10xLuitrGUb8VrDy2w7cmO4gSMLfArPY+ByfeUgWRnDvzPp9cLrlCJrK lpArND+9DswIhAhFSHXfipAUMJUoo+nUd/oW49SfdeDIaRKfZUTFH1qo8+uHxsssoLFM ATYg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=RWd8ZSrF; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@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 5b1f17b1804b1-42bb70af19asor47053365e9.11.2024.09.03.08.32.07 for (Google Transport Security); Tue, 03 Sep 2024 08:32:08 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a05:600c:190a:b0:426:63b8:2cce with SMTP id 5b1f17b1804b1-42c880ec215mr31133575e9.7.1725377527399; Tue, 03 Sep 2024 08:32:07 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.42.65]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42baf1b0c18sm192963055e9.37.2024.09.03.08.32.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Sep 2024 08:32:07 -0700 (PDT) From: Dario Binacchi To: linux-amarula@amarulasolutions.com Subject: [PATCH 10/10] drm/mxsfb: stop controller and drain FIFOs if already initialized Date: Tue, 3 Sep 2024 17:31:57 +0200 Message-ID: <20240903153157.918185-10-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240903153157.918185-1-dario.binacchi@amarulasolutions.com> References: <20240903153157.918185-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=RWd8ZSrF; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@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: , You can't re-program the controller if it is still running. This may lead to shifted pictures (FIFO issue?), so stop the controller and drain its FIFOs in case it's already properly setup. This patch is crucial when supporting the simple framebuffer, as the controller has already been initialized by the bootloader. Signed-off-by: Dario Binacchi --- drivers/gpu/drm/mxsfb/mxsfb_drv.c | 3 +++ drivers/gpu/drm/mxsfb/mxsfb_drv.h | 1 + drivers/gpu/drm/mxsfb/mxsfb_kms.c | 24 +++++++++++++++++++----- 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.c b/drivers/gpu/drm/mxsfb/mxsfb_drv.c index 1d8dcfd629e1..408b7a113906 100644 --- a/drivers/gpu/drm/mxsfb/mxsfb_drv.c +++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.c @@ -10,6 +10,7 @@ #include #include +#include #include #include #include @@ -222,6 +223,8 @@ static int mxsfb_load(struct drm_device *drm, if (!mxsfb) return -ENOMEM; + mxsfb->enabled = + of_property_read_bool(drm->dev->of_node, "fsl,boot-on"); mxsfb->drm = drm; drm->dev_private = mxsfb; mxsfb->devdata = devdata; diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.h b/drivers/gpu/drm/mxsfb/mxsfb_drv.h index d160d921b25f..0f9ae4ce450c 100644 --- a/drivers/gpu/drm/mxsfb/mxsfb_drv.h +++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.h @@ -47,6 +47,7 @@ struct mxsfb_drm_private { struct drm_bridge *bridge; bool crc_active; + bool enabled; }; static inline struct mxsfb_drm_private * diff --git a/drivers/gpu/drm/mxsfb/mxsfb_kms.c b/drivers/gpu/drm/mxsfb/mxsfb_kms.c index 7ed2516b6de0..9b453b0100d1 100644 --- a/drivers/gpu/drm/mxsfb/mxsfb_kms.c +++ b/drivers/gpu/drm/mxsfb/mxsfb_kms.c @@ -202,9 +202,11 @@ static void mxsfb_enable_controller(struct mxsfb_drm_private *mxsfb) writel(reg, mxsfb->base + LCDC_CTRL1); writel(CTRL_RUN, mxsfb->base + LCDC_CTRL + REG_SET); + + mxsfb->enabled = true; } -static void mxsfb_disable_controller(struct mxsfb_drm_private *mxsfb) +static void _mxsfb_disable_controller(struct mxsfb_drm_private *mxsfb) { u32 reg; @@ -221,6 +223,13 @@ static void mxsfb_disable_controller(struct mxsfb_drm_private *mxsfb) reg &= ~VDCTRL4_SYNC_SIGNALS_ON; writel(reg, mxsfb->base + LCDC_VDCTRL4); + mxsfb->enabled = false; +} + +static void mxsfb_disable_controller(struct mxsfb_drm_private *mxsfb) +{ + _mxsfb_disable_controller(mxsfb); + clk_disable_unprepare(mxsfb->clk); if (mxsfb->clk_disp_axi) clk_disable_unprepare(mxsfb->clk_disp_axi); @@ -296,10 +305,14 @@ static void mxsfb_crtc_mode_set_nofb(struct mxsfb_drm_private *mxsfb, bus_flags); DRM_DEV_DEBUG_DRIVER(drm->dev, "Mode flags: 0x%08X\n", m->flags); - /* Mandatory eLCDIF reset as per the Reference Manual */ - err = mxsfb_reset_block(mxsfb); - if (err) - return; + if (mxsfb->enabled) { + _mxsfb_disable_controller(mxsfb); + } else { + /* Mandatory eLCDIF reset as per the Reference Manual */ + err = mxsfb_reset_block(mxsfb); + if (err) + return; + } mxsfb_set_formats(mxsfb, bus_format); @@ -418,6 +431,7 @@ static void mxsfb_crtc_atomic_disable(struct drm_crtc *crtc, mxsfb_disable_axi_clk(mxsfb); pm_runtime_put_sync(drm->dev); + mxsfb->enabled = false; } static int mxsfb_crtc_enable_vblank(struct drm_crtc *crtc)