From patchwork Wed Sep 11 15:15:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3458 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 9A7013F263 for ; Wed, 11 Sep 2024 17:16:00 +0200 (CEST) Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-42caf073db8sf38463125e9.3 for ; Wed, 11 Sep 2024 08:16:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1726067760; cv=pass; d=google.com; s=arc-20240605; b=kGSik3HLKxCtFpA0kFMGVgTmGtMma2hnc8rr30cIN+AG/eC5PzyQuvL3+K89nJShM0 yYEHDPW2wsQ15XZWeuMbEWdUHW4cgbHplatKNQ9Mx2E7OM7ax7f8oQNHv7ySOk4geh4R ZXUYXNcuizCWQ3cHHki+7VK5PQ0uTSF08pIU8BjHSwcvrjKH5H1BQUzqRrEtHUm1sPO6 FI5I+2JsprEus0LSq5poUfdXIzdAahvV+7NHqRxvUx+Cao8xoIYV+RLt7cKg/toFYcM1 61orDjEe9i8HQJVWG6hAXqD45U/XQeM/3W5rcaFqUoDsSyID74JWNqwCQgFudgk7BqyN Eyfw== 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=sroXd/2q+uR8t9TohUWyZmyddOc9AEUWoeBXzB72yeA=; b=ln1b0sz6iu3yuj8zrW0bZnZLFanZtx4ILO+jIoElynMEWBl1L5gBEUT98Qu6oy2oIK PBKGx2zCIXC26CbgkCdlMKk30/DpG40NECo20Vl0l/F0chjpGCzt6pgsQC2GeOIuPXny 2mS7OAmlSMCKSaMEfURppaN+DXqgF7nYJrlFZ9VnLHLE/nl/vnDFuCRCjbq9dKLB669H G99ZxdFg6e9KG5OyGEwktWyi3fQSJp0fKGjZEMg7XAkja+UAh9S7zBsDMb4326P/YGP8 Mm95WzVbMOXppbX5NoBwLWDTYVRLxw5vFSPfZXeS3WXvYgvkMNNQzHwwft6Ly6/qwhQZ srag==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=X12miKkV; 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=1726067760; x=1726672560; 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=Ge40Vb4evu9oxh4Omkb4B9yW0ofp44z5/IV8LSo0ndF8zlwTIYJV7+J7KfqHxp6Zy2 jzVwiZj71ClwGzqEYS/HmjfzbalYA4KxXW6fY9RBp7vaZx6tilmhzTE2ef1g/8/RNkT7 d6c11wR+51nBBNrplpFexlbCsKEQ7k/ZDQpFg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726067760; x=1726672560; 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=WbTRJPR3U4/+ZxJc7otK7I2ENZpvIhsorFMfITakZOXR8BGB1uR5Vg9waKrKFX5Zb3 0Xnlxqtuq245svECmBGlopKn2RRXHtiuThMvQuCu9KZfVzCCQqYxY5Umpx9cQeITxANW nBZFRq3yrUkrJkWwzex701sQdiwRhmp27YbZDbgXx+0sjFpBK6+tXqycCjfmB93TRqD8 cl8MqyWPsypSDjllmjWG9/JeXdwmWxBpI6FFs2/PtigJWc5YLuZ4R7WYzkcvT/aUAk50 Iil26Jn9DCVVw2rKeYZV8fAM+7OTTPmS0KmGm5jfS2Hv1d3PDM6ByurslL94rT0R/EwT 3QrQ== X-Forwarded-Encrypted: i=2; AJvYcCV1pmcKUm7I7ep5JU6+vy4YQmZcJoDvj3BjL600hTIBDzi5MEYQZWjC0rsGO2o97gPZXY4nij+OO5Xif09i@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0Yz2ZYo1PEGA8qJeb7YhF0lChh930TbK+wtbgnR02XZ2kJD0b6Jz rhWPZZw0aiO0NfLeITyYeclXUk4JIaQZs/MhLHOAugyhzaKJyFuoyIb4loGqcf/eHg== X-Google-Smtp-Source: AGHT+IF9FQda7LHetN7WHc6ZnW2887UKjYSNsNjphrhM+S/JfXNJLujCioDBD/kxxQzZE/EE3+6Puw== X-Received: by 2002:a05:600c:54e7:b0:42c:acb0:ddb6 with SMTP id 5b1f17b1804b1-42cacb0e00bmr121607775e9.9.1726067760013; Wed, 11 Sep 2024 08:16:00 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:600c:46c5:b0:42c:ad31:3854 with SMTP id 5b1f17b1804b1-42cdb394087ls11945e9.0.-pod-prod-09-eu; Wed, 11 Sep 2024 08:15:58 -0700 (PDT) X-Received: by 2002:a05:600c:a4c:b0:426:602d:a246 with SMTP id 5b1f17b1804b1-42c9f9d842cmr144957725e9.32.1726067758186; Wed, 11 Sep 2024 08:15:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1726067758; cv=none; d=google.com; s=arc-20160816; b=IYvKwSdELXeRWD9fGt72SfCdcRqg3zkLAT2sp83+Q35mhD/nMdhNmSfNw2kcaW5Rpg O2pZ7rvRvvK5QbODK5Tlu5G11Ujm8/X9loyBOUcm8k2i2EWz/PkN/7yC9nb3zF+QG1Oj V6G9Y7b7qOHFy8zZa3MGgXtnBswz/VqZogOP32r6BBaDlhq8RRGEp0TTx9Okx/JuXDxO wDSR5dm/ymUnBBM//xSTu+MNTJ52AnvYWSDkI0Kf16CLVMXIxzGyBNpwDL1ITE6zeiGg A35kQXVrtSnrCs6WhbhmNkzkFHXAoAlV1mjyskMv/WDeSS+2V0j5nmVTnkSYPpOCmWsq j4Rg== 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=G2PTCERATRETXbI4y2Mn9nua3GxiP/cH2Zt0yVsKxHlkQa6VImQm62IRLU8jM/T9is +d9MJJBciP9LAqZ+xYKh+jeN+5rEpLTHWaHj6fmVu72IqztKxlMnVPPKassdkS0E/X5j cDoPPOwXcoi/MmwELPb6lPd0BqWh4QbzbCZf7LtCtyXZ5pu19edQx/esmqxgin0eSwi8 Ow49fFRlxuj7MM+BQFOOruWRSz7zZDZTK+Vy8YdSiMPfwAbxaotUrP/5Bf6+I5uSIZ1N T5N+DVH07LbjiTC6JoyIN9EJT3+UFSyvLCnRv/4gfd5tXjwwW9V0SqkVPOyM1vpk2l9X 2tew==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=X12miKkV; 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-42caf2f9d99sor39546075e9.9.2024.09.11.08.15.58 for (Google Transport Security); Wed, 11 Sep 2024 08:15:58 -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:4f8a:b0:42c:cd88:d0f4 with SMTP id 5b1f17b1804b1-42ccd88d30emr30034815e9.22.1726067757235; Wed, 11 Sep 2024 08:15:57 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.41.3]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-378956d37a1sm11797177f8f.77.2024.09.11.08.15.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Sep 2024 08:15:56 -0700 (PDT) From: Dario Binacchi To: linux-amarula@amarulasolutions.com Subject: [PATCH v2 01/10] pmdomain: core: fix "sd_count" field setting Date: Wed, 11 Sep 2024 17:15:46 +0200 Message-ID: <20240911151555.2915258-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=X12miKkV; 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 Wed Sep 11 15:15:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3459 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 46DCA42E89 for ; Wed, 11 Sep 2024 17:16:01 +0200 (CEST) Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-42cb6f3c476sf17648935e9.0 for ; Wed, 11 Sep 2024 08:16:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1726067761; cv=pass; d=google.com; s=arc-20240605; b=LqKu3PjHCFenwlB94fdh31ALcrbONpGqm0yvm3Vs3RoGcsG8ItcI1kmmzEeNWiRVGJ JSWE6OtGB482onJsIYowgVVmp5AL4rTNFCpC5qw0A1qk2GB/0Cc0nA8bE7Z+pYOsyQio SJI/dYv78eYDgHMVLSrSRThrC01l1pP/e/Xlc1nJNxo01EATHdK3GZBbvdFYtsLOIPsO 0iIRwRynZKw9Fv+eC+GdKR4wSQbE92b08NxZdiDxwhO3GR/g9Y/lDZ2Ujuw+gSjwpoJf iF2gV+bLAI/Co8yLbTM5Il78qh5EtivD4Xq1GnNzmo+s7NZrxAf4kbYdT9yaoGt6b6v7 JdwQ== 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=F0OPrALiTnQDL2TZXQlg/EORienN7qmCL+eAVgAZ2Mo=; fh=/Nc01K1g1RGuKs+dtUdSoWbuclN0EFxF02prC/7i4U4=; b=YYh/W0nffj7U6ispWhDMiy7EynD/Pl/Seg/V0aH9rwnQq+yJioGoZ+BmBrC+IdwEdS xh/1oRPXxCHjgF5Mj6xGEIfHTgvCSRCVBThmms/0vf23dh3goVZaZr05UK8MuXoEz2ue NNulBU44ZClF4TLtdEErkwdW6uHKvq5+P1MXaemjRCtnKxS5r9rRGdshJeS5Wun5hNAN NdThIsvfNLIOrof8ENu0ZgOUYlXG4UDedox8tGM6yncwoX4bl5gvqpkloH1wlK/9Qbd6 Lpb5uJcQ68dOEEkcG0ylfPFTr9y61S1HMgdiJT6kHs4ZUUxvJisJbnqzX2xsg8SDf0nj hZQg==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="ZO/m3SaA"; 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=1726067761; x=1726672561; 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=F0OPrALiTnQDL2TZXQlg/EORienN7qmCL+eAVgAZ2Mo=; b=KBAPxiPGmi/RqpGUyzBQ27JwLmDyg6CXh6uE4OtJ9vKyObKyDP/qQl1f43DAQlvS2P mPKwySCg/2GfSemcFnqcQLRxHJJ+uv83DJvmFrm57h3PB/IYXpgPDv9yJQNPnml3dC2P 514Ha2eH2/tyeFEDVqV8LAddoy/FJJ4cZrjxw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726067761; x=1726672561; 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=F0OPrALiTnQDL2TZXQlg/EORienN7qmCL+eAVgAZ2Mo=; b=BC4OU8wdp8MMZ273K2jVnQM7YqtVk8ern2fSYBL7XXPLi+0mLK4beYLpQldgVkNHCS zqHrbwkFzB4Z1nYFH5m0fWOg/8Dx6+exicSkJE0hKO98YO9cjRuQ2c7+vzHoL3SduaXK tPemfDelAVXQ4MALja6iBpxo01RW3XqpxWID9UYXNrfx0ToKi2/38m2QFvwPhkLX7M1f s5S1jzImJFUdLT8MpGC0+qniyNR6Fez42LSSw3P0BpaA2e9nzmdKp0Up309/ixA5bWfT 6xmacMRwkVglouPUhZGZ+ZFcBnWRBXTzX6V5cm3T8YY6YXGtnkPASw/fdu0wR05lIaWd s3Dg== X-Forwarded-Encrypted: i=2; AJvYcCXz7m5sBWKgwU3ElJXHx6Lo8FIsvegP99O0r1Ubj6qlUdpfjFxrP2SaXhze9Bod6aZys3xzhiADozpx0EpZ@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YwncVNsG3iI+pnzsXLM5M4a2MAbBsWopxZ2oN2cAFicQmxsS3RQ o0zXvshNrRdH3ljmAOsKhR+9E2tjDA3xS0vuZfQw1elodIuH9CRM2o6pzIstakRJ4A== X-Google-Smtp-Source: AGHT+IG/K0ohFMqUwjnGarUdqykfQ4BX2P1Gb7eRefTvA+dGsVf/i7AVqEoVhkU3usJalo8TnIMcDw== X-Received: by 2002:a05:600c:314b:b0:42c:b63e:fea6 with SMTP id 5b1f17b1804b1-42ccd35b731mr29730625e9.22.1726067760760; Wed, 11 Sep 2024 08:16:00 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:600c:3b92:b0:42c:af42:6403 with SMTP id 5b1f17b1804b1-42cdb396bcals11055e9.0.-pod-prod-02-eu; Wed, 11 Sep 2024 08:15:59 -0700 (PDT) X-Received: by 2002:a05:600c:3b25:b0:42c:b905:2c04 with SMTP id 5b1f17b1804b1-42ccd325012mr29171075e9.12.1726067759324; Wed, 11 Sep 2024 08:15:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1726067759; cv=none; d=google.com; s=arc-20160816; b=XVJuOCwz3POl/yQaxA6BVlXhyBE3W9Q9y/3Zz58mKPjPWvuW1IPTWzAqfyPAfIeRdI CcOEKsHFaDV8x0xmPpTgUD0lwre0u+1M9HPI+yQ7efmttKT4fWWZQwz32CeN7dcMsqdf bFfiqLPcRhgcpavf6vEeFQj1g3nc9f5WqEzIk3IOAk+yHqOd++EhOXqIp8PGvLTxhJiy P2nItHgHnMifVbLI7WKZ+XyF4s+G3tZuaXSAx0ol+w2kKVZ2RrYNQbrA6MO9AbYW1gbQ 9pBwup44u8m8++M5IVVf5mqjTJXvi9LzOvzAVrGHICd5vqkXJhfX7S2tLKmZt0MJWzzm tzTQ== 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=OlizUISIq606CN1afUuSK9uaL8qk/Z/dx3I3g+dWdfQ=; fh=FtQepR0uNoeKT2PVdKfTKOkvEYfwbRmoVE9BmlYw3tk=; b=q/Kl6tdkvAaRe1lCL3afysE7FbtDfm+qH9+a+Z+2kL9C83iBnGXJDn0PIrDoZSD6rl KWQ4O8nSSt7bPOu5JS1P7ArVw3aXGrtV5FGID8gTSH51cRkqBW9/KwwyqOjRREaVgsB+ QTAxByJbpAfKVovT9aBsEKUbuIeltt6HFmYVhiSFzoouc5J/f6llED9uXZqT0z5YtRQf 4LSzZT9XOgiRsV4qL1RnLWl5nBtSCR9jBHiNQvIb5n19SnevGGst4UBZR93a8f+4xqKZ WRZfINf3aUJF8ByPZujIED958YKvaaBl7IKQIVSPq1PqQQMbQgk1b3KHAdEPFf451dAS 0M1w==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="ZO/m3SaA"; 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-37895611e5bsor2158298f8f.1.2024.09.11.08.15.59 for (Google Transport Security); Wed, 11 Sep 2024 08:15:59 -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:4e90:b0:42c:b037:5fce with SMTP id 5b1f17b1804b1-42ccd30c0eamr31635835e9.3.1726067758460; Wed, 11 Sep 2024 08:15:58 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.41.3]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-378956d37a1sm11797177f8f.77.2024.09.11.08.15.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Sep 2024 08:15:58 -0700 (PDT) From: Dario Binacchi To: linux-amarula@amarulasolutions.com Subject: [PATCH v2 02/10] arm64: dts: imx8mn-bsh-smm-s2/pro: add simple-framebuffer Date: Wed, 11 Sep 2024 17:15:47 +0200 Message-ID: <20240911151555.2915258-2-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240911151555.2915258-1-dario.binacchi@amarulasolutions.com> References: <20240911151555.2915258-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="ZO/m3SaA"; 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 | 30 ++++++++++++++++++- 1 file changed, 29 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..34cf781bc548 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,34 @@ */ / { + 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>; + status = "disabled"; + }; + }; + backlight: backlight { compatible = "pwm-backlight"; pwms = <&pwm1 0 700000 0>; /* 700000 ns = 1337Hz */ @@ -59,7 +87,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 Wed Sep 11 15:15: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: 3460 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 18E6E3F263 for ; Wed, 11 Sep 2024 17:16:02 +0200 (CEST) Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-378929f1a4esf2251501f8f.1 for ; Wed, 11 Sep 2024 08:16:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1726067761; cv=pass; d=google.com; s=arc-20240605; b=LBaONOhFuDdWrEBUqo/WKEDz0q/eqaXlUcHr2MTgFxFPz5iA42mV5y/ZkDUy8EWsHQ +BeY0ZbRDRqDLqruYOJQOVipKgocUmCjonspWLbHohld5Bd1vwwWgoElE9btqDLY5gvX 3dd4E1SkrZHz2qpZB/UDAlL/hr5vagG8V9HOpG6r0+EsRpg5gLqen3Plu0FAq34KR2BZ tkVBszTwvEH13dSz3hKZY6Mw/E+LuYFoJZx+sPdEXV4eL4imrLYFFz5HRnqwWpMf76No ZrkBbdMPUE5DSysFk+pvZfrdpyKlsjqZ01XSk/fj14sBVHmqP4xQUdRqH518HoliqZJV SlBg== 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=v3gLhJtUOk62CdfD847q29XvrMZT36g0k4AzVYXq/as=; b=AwQ4OlmK0GTVCJmzZlHSe+KFcZyMjq/f+bZeJccDGKmzclrG3PHKRAGDcGmC1ls5/d 99DuXKlr5GdarbQRqv6g/KV1Q3uuOpba2oQosoX5ZFHi7W+yYX2mPo1IRjKGSRn9lVwS RaVakDpZKAdGGzkPFJlNUrhKuGStxx1pwv9tbHZD/0HinS5FKFOvvfLNFajNSgVHuyMu NaafNIGIVme3F/hAFFbyJw8FBQUJFnRtBSYC/jtpgjZgXfJU5OQ3oRXS5w1+wST65GVR n7w1B9AA5uBw3pGnjHGuta6M3O2lBMBIOmjlYHcwTe2UtjrH8zd6PxYuMotfu3iXxft2 P+zw==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=iAFXbEZ1; 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=1726067761; x=1726672561; 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=IgUz5ojmYjNts+1r2dBem8kwN+4wpkpT1PHcZd4+BQN9F4mQERztcMpGABcB4YzByW nHkoD6tQ7kS6IRrUqGQGjgcNXgy8ZikT5rvb5UmwHXz+TgSCYjtuVXjK9ZfcGzU0sXZW 1Z86ScXPwblFCol/ETUKietghS3ptj2m/w7lg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726067761; x=1726672561; 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=Qk93euiuVld25pgn1/BkSgycTploVU9pVPDR0SOonGilXVd/2QasuRK5g9hXJlcEwf 4nW6MKu0fpoCcQugMg2CYoJgQmXBsHFoKKsO2yvJBbRoLiflpbbCdJgSZcx59fDxr228 JwoBlG9B20KerVoxGp91HhUobzLE2EKmmGQZjvpaPvu8Mtu39QtEJXWePYXPWW06bDyf UtUhA8Ej/A1oRSU5Oo/ST5pjdl0HGGIDLqBxZ7fTe6xM/h1q2+ME068S4yXF6dgapLpN v/c99kEHTWPrbcvrOndafhiQHuTuzt1ed379tx/qzhKtoBJhOXA8vYzGKX8/mV4m1byM cCfw== X-Forwarded-Encrypted: i=2; AJvYcCW93h6r4Gr3cazmvhQzFzyNk5tUUCWU61Iasl96xheAq/zGawd0natUKxrb64iHT2qJPWogFQJsGA57KGz/@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YySmmGW+ABw7NyMwWAJtqhBIM0Eh+u9+t+Ysj29zPRQC4i76alJ u59dCMfhvsxpNSgmMwzbakif/6VE5Yyd3R7DGg0GVgJ0qhzCvQG8BG2rTwFJ/4+46w== X-Google-Smtp-Source: AGHT+IGnzZ1Wve5LcNIQlZrKwVXAh9EwAuT+hw6yELM3abKwOo3OMZwivyodg3U5CdUiEB09nbdjLA== X-Received: by 2002:a5d:6942:0:b0:368:420e:b790 with SMTP id ffacd0b85a97d-378895ca946mr11041713f8f.14.1726067761601; Wed, 11 Sep 2024 08:16:01 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:600c:46c5:b0:42c:ad31:3854 with SMTP id 5b1f17b1804b1-42cdb394087ls12055e9.0.-pod-prod-09-eu; Wed, 11 Sep 2024 08:16:00 -0700 (PDT) X-Received: by 2002:a05:600c:5102:b0:42c:bbd5:af60 with SMTP id 5b1f17b1804b1-42cbbd5b298mr71463825e9.24.1726067760013; Wed, 11 Sep 2024 08:16:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1726067759; cv=none; d=google.com; s=arc-20160816; b=pHx2zLSycFjIFtFT+YVUpvtenBvF7PnxANY1WayK2Hy5UKf2DrQ6ac5BQstnATbjgi eTLkkylQ0AgZRz29NhsRN4dP2XGwGsvG00NV/lXqGar/NCQmDmF4jOfk+CMF8kPt1CNt RlnmJ28YKijZiBq/+i0B+qfBGSgHL1lWEDG189EIHKX6S6MejgJKybhRROJNdRHQASYe R1A2uK3IDKCEkHmlbM2ImSdQTo+3z/QhKLWx3vmraR/ZmyLVrGo7sxGHf+oxmw1f7WOi gA51RvaAIyc417p+YivUV2wUUQ+5rMhjpCx2FOVKMVgcD24UW84gDI7eSqGYbKjEkL2/ rTRg== 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=LQ6hq1lNwXjnPGX4XxNjaP3Gq+1EwnKoZgUZ67SplEBR318DOCY/QpIsSo2tEa+J6o 8u/yfYEPZCMH7WofLB25yejM0xbRWnWdbcG0u2IH/BGnHQmwxiVDQYMbR0uABUsqbjg5 DqvMfc6ksGmuWk7s2WJdGZFzH05yo3MZ8S8oxFH6nq2/rzcse8N8kKSgf7yPOwE1+zOu 007u6fT1dGqFOlWEnpmCMSFjJZuLDNq3RdJ/b4YsZP+hZXTj8dEFn/OD3EkyW6itPTbX r6Hue7tPF/2T8ojTqpylOXsLSaXW82YRlzThKBizLujCA0XI8WmrIfSJ+TRD3ioh/mfc 1oaA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=iAFXbEZ1; 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-42caf2b2772sor20946815e9.5.2024.09.11.08.15.59 for (Google Transport Security); Wed, 11 Sep 2024 08:15:59 -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:1d8a:b0:42c:b0f9:9b28 with SMTP id 5b1f17b1804b1-42cb0f99c0amr107429265e9.28.1726067759339; Wed, 11 Sep 2024 08:15:59 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.41.3]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-378956d37a1sm11797177f8f.77.2024.09.11.08.15.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Sep 2024 08:15:59 -0700 (PDT) From: Dario Binacchi To: linux-amarula@amarulasolutions.com Subject: [PATCH v2 03/10] pmdomain: imx8m-blk-ctrl: don't turn on a power domain already on Date: Wed, 11 Sep 2024 17:15:48 +0200 Message-ID: <20240911151555.2915258-3-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240911151555.2915258-1-dario.binacchi@amarulasolutions.com> References: <20240911151555.2915258-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=iAFXbEZ1; 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 Wed Sep 11 15:15: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: 3461 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 D511642E8A for ; Wed, 11 Sep 2024 17:16:02 +0200 (CEST) Received: by mail-wr1-f72.google.com with SMTP id ffacd0b85a97d-3750b4feb9fsf571381f8f.1 for ; Wed, 11 Sep 2024 08:16:02 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1726067762; cv=pass; d=google.com; s=arc-20240605; b=AiGK8Kn03Mrin1JSs25OM4Xz3+a8toZ8mhGH7KtEkbQ6GVhtupw9R8MeOPT2QN0zMb fPOQOrWDhIgpedp5vKFd12N00T17OSOxmKI9yiSeRqumOXXUDroAIEwFRLvox5Kjnb9/ 67849cwlMdmhTOwon1i3rv5ZcPRIl4NnIl81Egxx74D9mjladvt1IC/Y9o1alKVgVG73 4o1GinQUV60kLGC8oHCEIa0s6nza6QRnyipM/opSPKNRy8mPuBEHWkFiZKmTolbJ47IC gJqoBzS5zhxtmrsSBl1U7mBjI4KNRQiYfT00JcNS84b/nIaIbGZnOMmwYO6Z/NsxcCsq yUog== 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=zMeJaiX4dLi3yfyO97gFnMJJwtpo9nagu9piqj3f3IA=; b=M+3t6AWYbUpH5ZzDramPg7W7Ney/aNL+smzLntntrmOwm0lvobBvVF1YhAnw/QXrJQ 34J0uP28LxJer/XBcoJkiSBmpVvFIKxw7VFRi4RB1GtUW+f4yKCbl6/2Kw4vnEZ/7UaP +DVB0xGTA0zABbuu0RKo8L3QBJCJ89YE+dyX87Mt+40Tphlr6XRB5Mu4r1okQgaU2MfL MH7Z0+3OH+J/PQ5PyJk00wikDN5tDvww4I1pZcZdLC19MQQVldnmUdys+CDaXnieOSxE 6MKqCOGjS3ajruiOwSkn/LICgCdfeRNHrL+ojqPdH1RVcSKuPu7VmVvdvUY/OU+1+OAw swIw==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="WrM/Psro"; 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=1726067762; x=1726672562; 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=qAzosMJY5Bb12U9IppUQTcJlDXE0nGwgmMK+A499sbq0qveWjhksabI9OB9vTCcolZ z/ZeiyTxeFuwulOuzlFQgUhkIbagHadHVZOaWhN2qEfCHaB3MPMz8Bb3sVkJRtfRpXTc i3IMISd4dqZPDpHFm+Vj3dkcNRPVq/WcOlz68= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726067762; x=1726672562; 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=lyZ61EA/Xom9eVZ6JYNfV9QNR6oBMJCZgQNnV071jJQb7InTdLcJf/MDVLG46qBPqi BMDA0I4d2VJMqJQxTZHGVy5dvxlkGqbJ/a3OmWK5CdLfbGmCWThrpckmj4GPnW1NZCpg 5QJ7FZ/tlafcYJ9vBKBbYK7qjI6Dq1n/C3x0hiJUaql5hGdqMDtLhfw5WCfy54Lte8ps /0Wv2CYUicsDL7rQyYmGXa6nIPgpqXOTRtLJHGbwAI+QoIhS5avHY8LIqtaFbMCwPpOk V1Jz+S82LqT2XVscYWt+Y63KLo5gQko/oVQHr6SH1vUHcCHDg4V1k3nd3n5Sp28y6BW+ 8nbg== X-Forwarded-Encrypted: i=2; AJvYcCVqLwhBVSyxQvSngx/r4u5XFGLZw5AaDSvPCutWRC5+xF84vRSY2Z1uiwTwV1QmeYgCpBl0MHVmvqDw/jxi@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YxqHLUlBEDzldrgOSmSkzGU4Mnklo2eU6sZ/GW0froF/9dFNQMO z7C/RC1PocxKC6m8latnNceZklGe8rEv3/Wf0qy5ZbWKSoWTzhb/iyY5ciaT5zgz7Q== X-Google-Smtp-Source: AGHT+IHj5viUdfSiG9lT2jIcFghttEIu/Ve5ZrNXFI3wIF+pUhc5d7Lij2ayimV38chpRx76evBs9w== X-Received: by 2002:a5d:40cb:0:b0:374:b9ca:f1e8 with SMTP id ffacd0b85a97d-378a8a7aa3fmr4271801f8f.20.1726067762432; Wed, 11 Sep 2024 08:16:02 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:adf:f001:0:b0:374:c124:db78 with SMTP id ffacd0b85a97d-378883bbd01ls1302586f8f.1.-pod-prod-00-eu; Wed, 11 Sep 2024 08:16:01 -0700 (PDT) X-Received: by 2002:adf:e9d2:0:b0:374:c613:7c58 with SMTP id ffacd0b85a97d-378a8ab1658mr4269437f8f.29.1726067760914; Wed, 11 Sep 2024 08:16:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1726067760; cv=none; d=google.com; s=arc-20160816; b=ceHjrL9L8BN4f6eB7+jMZxoppmlxKgGcrhS7EFtTQDYIK4QleIV17QiCwCxxOzezyu oOTD9CZ3QcNnH0hKtSPaCFRVh0DF2G9REXlGPj5E+dY7P/t0vgnPhzHHnl4V0x3oDzNV 2kHx4Kjj0cgwjjLmkWf4VfvqzTWtmSZL0s8nE4xcB0B3PtEGVcTC8QUKtrCrmGsT+rav 6seHCrNkI3KtXHdn/s1rdJRT70IsyENaYyfO4lte3jHO++xOTDMsGMRWxvMZlH3qRQft 2kBzvqBU5raVenQuQ5WY2xvzF+ChfmSvAVGDC8n4ERCq2F3CzgPy2nMa7WcfYP1Pv9hW Qhcg== 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=E70vHCSI6cHJW86DK9qmxt/bRAb3tErwPde4e88vwbqcCrVhdYWhmLHlmblUJBDzWV pfFjFdPFzN2ayU1BBftHaX94IaX7w1tJ+F7M5NPX8Esw17XwT9D4AaieBs1vymRdeLEy PuF5LIqaxbIDaIwb/bpU8FZ6GztE3G6IChMQZrKqq4dZnXqDm2tsLH4OKS3Mp053LF8r Y0aW+OIpBTl4I5CsvDM3QYvfTPurFhguxSzqcERoUlLdsrd2MMjtOxjXmrZ1Foze/alT 90Y1oz/h4ni/TLG95p8oEdN4+iD85mLPBrJo31f5vDo7pEXOzWI1aW6MVOJ7EL6Xkkrl D4yg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="WrM/Psro"; 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-3788b5846b7sor2094939f8f.5.2024.09.11.08.16.00 for (Google Transport Security); Wed, 11 Sep 2024 08:16: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:a5d:4b4b:0:b0:377:94b:4f51 with SMTP id ffacd0b85a97d-378a8a3f05amr4138653f8f.22.1726067760213; Wed, 11 Sep 2024 08:16:00 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.41.3]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-378956d37a1sm11797177f8f.77.2024.09.11.08.15.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Sep 2024 08:15:59 -0700 (PDT) From: Dario Binacchi To: linux-amarula@amarulasolutions.com Subject: [PATCH v2 04/10] pmdomain: imx: gpcv2: replace dev_err() with dev_err_probe() Date: Wed, 11 Sep 2024 17:15:49 +0200 Message-ID: <20240911151555.2915258-4-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240911151555.2915258-1-dario.binacchi@amarulasolutions.com> References: <20240911151555.2915258-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="WrM/Psro"; 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 Wed Sep 11 15:15: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: 3462 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 1CF3C42E89 for ; Wed, 11 Sep 2024 17:16:04 +0200 (CEST) Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-374bb2f100fsf2971746f8f.0 for ; Wed, 11 Sep 2024 08:16:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1726067764; cv=pass; d=google.com; s=arc-20240605; b=h466FN/txQH3brIdrCYS1PDnjk/KFFJ7Eir3BPtEkD6yj812ZtA46UnSbdPR0r80yM LphGUU/IGTJyLru6UvShnc2nObNAvP86/brLQUrlwhpbZu7zLngMW0qWYRGJ/OUZDvhf uvfcLgNT9VgZHjLCVGJIfvPxAIlBK88LIl0HMWNeFAcZuqGeEY+yV/MWDifLFbJ3c8NS +Q9vTYNX724vONXtBOZ3AJLOmWmzWRIeO9zkrJx1/2Cv3HvHchuPOFtBKsU9pwXLQjE2 gQjHZrHcEE/OLFD2dsRYZsT5xQAGVv0hQ3UeyZl58tQJf9Cm0HzQBluBnU2HNQmEDl5R zreQ== 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=QAYQfJIcA/VKnUbk4qvDjcQuu6Y8bi6rfCYoO/FbOqU=; b=jbWITtdGA491AX67jVGFPv5CmfDT7B2rhYvyHh0EM57LhlnyXMH+nIKhyC4mOq6brW RWVPcv/0bJCQcvdMdONfI5HrvkNYzWKGNghFvWDmSdCpUuezH6hdaJ7Q/LO+xKA0PPxg TEc5F82MDIeLbbG0kYMH3ph3U7y0cqur6q6ASBMD/CA68cyiaFwiPnib3R9XGmPwxePO pokV5H/gEnzRu7ji26TR2O1YxpDFF18x2CNniXIIngQaiIrDfvb9ndRcNrd+bSvy8r6R Atrs4/wB1/eUA3oFoWxdb2/NlktjLSFvUNr3VtfyYdDoamI1WEoTvKl/mvuwWCixrZqY aCjQ==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=S5rqEFOR; 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=1726067763; x=1726672563; 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=FMK5xPWgWyyROKXAG+mEd3BaN+X0a5uusXac2EkYAvTJda9VsWhA1z9KRPJ32oRyuK LbvWO3uvLiY9rafb6Gu3xqMeqXA5awdQw9+BUI4Ni+cZaf6V5S5T5eSwKkfC6WQXKL9p Khr/aaGagCUFkCX2vfd4wY7uhKBemLfW78c+Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726067764; x=1726672564; 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=q/5iSR+j7g5cPSbPujaINcsCAR8FKs/nuqbBvuZctvGo/CBDXu2/o1aWRqkoLmzPoF 8Y3krOZ7pjs+2D0NDzMcMkCwWUGBERj7dSb0FOfynSxXQE8rTHDOkG9UOIInuDTbhVEo 4ncq1KzVrLxoInxzAxFBBzwrpdAlMzrNBtyBu5i1MIMEhj5fov/IjwIK4Pvmfi2Pzegg 0FTCVT3NjzwKQJmHCCZAIpB/dszvA9m+4+F3CdjQGmkyrofh1DPpbYAYhAKZbKEq88y0 y0JANBzN7WN3GpdZ/drpVowns60rpT4ESla01Ih5tDFBPn4grgzNvfc7AoaS76XRLuQa 5vww== X-Forwarded-Encrypted: i=2; AJvYcCX9MdUuJ7orxSllep7vZ+yydyuNxakGH2jVpGe2r8s5AzxD5X6p6N0kLAmjG8bV69za4nCFYAFmAd1DJ1kF@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YwGTuYyWIfiZOGyKg5wVaWdTPIszJ4O52RLMx2JOoXyH13Tx/NR VdIt1vBivWawJ/gf6C1qqKFAwgtt9OmJPUVOXzknlGnYMdqJcF7rdIPRGnAykSsc/A== X-Google-Smtp-Source: AGHT+IF73ZY+S27gMEet9qyJZkT7ned2D/s3Ddn4pp37FXb/dGGNqJkueAKTZKnTNwQbS2c3IS6L+Q== X-Received: by 2002:adf:f38d:0:b0:374:b35e:ea6c with SMTP id ffacd0b85a97d-3788967487amr12399581f8f.40.1726067763656; Wed, 11 Sep 2024 08:16:03 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:adf:f411:0:b0:368:4489:3f45 with SMTP id ffacd0b85a97d-378883d0021ls1288898f8f.2.-pod-prod-01-eu; Wed, 11 Sep 2024 08:16:02 -0700 (PDT) X-Received: by 2002:adf:a3cd:0:b0:374:c1f9:ea79 with SMTP id ffacd0b85a97d-378895c323cmr11751150f8f.5.1726067762163; Wed, 11 Sep 2024 08:16:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1726067762; cv=none; d=google.com; s=arc-20160816; b=Kx9gNHP6HkQeJ9sVjnoMR8guYqdVw2TgC544yh6HVKfo/IdNfkN7EFPK+i34RMK9UB G8HuqjWIZXUkTIXBntkWWvxcdMIo4SLPAWY+E0zhtQgsVr7MqMOgJPAPqpeVnABh6XdS b/Fve6Fu8f/F2uJOWjF/ABYkQQEldyliWQCGQnWb27u3N21DDPkgv61uLJjzWHge8LLe GiYSBU6H+iEc5qFxSSfIfknLLFGxgXTi6fO+kI/UZ7FIibeWw9i4OwkefXxowzbUqpfn RZwgtRRxUwY+NdPxiAqbjt4AMRmL3E2bk1xYWEzjUh0nwBZwZzwLAEJBCG2gJBCAqH7u MMHA== 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=yx7yPKJ78xSosEn5hVYoTa4s+ks2g16OuIPaWAz6Tg9/VHCcA2TQb2NjDf7RrrNSyN zBrU0g4EXMPcOu/Hwi9LdKtHuWu/fO24M0qwbUa9daacvPVmepMFNiURd+23RagoFLE7 CWsgjqsoP2xzjAGeHEUsdQRsZrSrryQ+IsaFV4r9wDFmLDb88qT9zaHMqtQ475DYYLtS 41CU41yGxdt2F1rbUutVok/PG84PdQBqLaBchWo5pEWNMAsFyuK1FqoyTIuXECIy/Z/D 0e2GRTFGiXRw1j7aGLbzd28izVRYh96OO136dPavbCZgIoHu0GqByK33PpiUFyel+X15 ElWg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=S5rqEFOR; 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-37895600ce1sor1962235f8f.2.2024.09.11.08.16.02 for (Google Transport Security); Wed, 11 Sep 2024 08:16: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:a5d:490f:0:b0:374:c847:83a with SMTP id ffacd0b85a97d-378895c32bdmr9668516f8f.8.1726067761365; Wed, 11 Sep 2024 08:16:01 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.41.3]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-378956d37a1sm11797177f8f.77.2024.09.11.08.16.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Sep 2024 08:16:01 -0700 (PDT) From: Dario Binacchi To: linux-amarula@amarulasolutions.com Subject: [PATCH v2 05/10] pmdomain: imx: gpcv2: don't turn on a power domain already on Date: Wed, 11 Sep 2024 17:15:50 +0200 Message-ID: <20240911151555.2915258-5-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240911151555.2915258-1-dario.binacchi@amarulasolutions.com> References: <20240911151555.2915258-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=S5rqEFOR; 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 Wed Sep 11 15:15: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: 3463 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 D5D133F263 for ; Wed, 11 Sep 2024 17:16:04 +0200 (CEST) Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-42cb89fbb8csf23070225e9.0 for ; Wed, 11 Sep 2024 08:16:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1726067764; cv=pass; d=google.com; s=arc-20240605; b=MkUHsYvseU/nW7Nyqeoql1qwY1nIGEe6PJ5sDwgl5cqFiA68OOs43qA8A+RzRsD6LW TjTDQJ+ROaihAcYg3AMG0+178xlzeQwxsU/0JxMS46NWketvjPCTXcZV651gOL+XSBlu T/J36BEgRDw1g2IK8lBHDN3mTrZbFXbxRssLsDpIJaOBL0aM6XeXZHSf2c1H8Gq+F4gg GQlhc9L07klVpMdkaftnG77a1edS47P0VTtXK6t3dhW5z0+IcTjp3OwRsgp26NvzEQpm azAgFxWIhB1slu4wxOt7/BcEc2WFu3WLfegCugl4g/YNmz0T6YAoR2Z28i2AGijkjkIG lgIg== 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=PFmet6+ACBZH0URET1CxlMeXKfOE5phwtd15DxPiBUE=; b=W9s7pxGUhJxcM9UK4xjoEMDUYB1vxulmvvWiVD+hi88dD6iaxKS77Dwb517+ZbfZsW H7DaQKL31sAHxyKa+5rMh81a1993U+5Iw+CIhsVzhzg0Qp4eSXB/LOAKiduHggvWWUIc udzvv+MHHI/YfAh40dMWwa/kWZXvJq1QH8qmfQrWHw/+L7p9WpxC0f+o+sKouxIxw0Ux wGqy5VCo2SVhftPvQpgHT6d0YKWuP0IAo/zENQdSp7tWcwXf4VDxiE3Fid38p+IBYcaJ dAwJBzLHUM66DqJi4OZoizxRnQQ55GoMT7vnCaqz23BJ6wyKYNzcgyvab6XzPkiNUwb6 DR6w==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ARHacWVG; 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=1726067764; x=1726672564; 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=hAy3vtF00ZsU7oeghSQNzp516Up51AeETFm+CeQ7ypq+tvxTTbfQJ/DImb8hbaSw5I Y3muBiMobG129me8WsXf09CaDCVoF0dmEOVHMbchuuhrMAosDG7u682bvJSy/eYbjwUf +IWQjsGFWCuUubk9DBbK1oax+/IWOvLjp5ld0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726067764; x=1726672564; 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=fy2BbSrYUApzQTiUiyviWWzGIvY9KK01+w8CwOXFlR2bo2v7ekovGq8+QIdJdtz0v/ VHaGFWY9w6PDPvqCH7JPddnvRfNcb0sufODlassuLZ31BykByhNR7Fm9pJqoFRd9tSuV K3QdVtpB6EXhD12f7QA4z8olGPoJTYEoqrDJ4HgFv4lqhBQ5CylXXGw2K9s6v9hivJko d+3hc9RyGyFbryN3XNdFuyiqYUUs5oTw34RwOf170LzUdiUhQevOSipnQKz12RodZkql VZ5g4x4HPNiHJjhDo05rxZrjC2Ab3iY4C6gP7FWzxA7cIiL5JxqZZxypVHLAJYL07IfI BXJw== X-Forwarded-Encrypted: i=2; AJvYcCXUoTagcGY8LHIEgd+VPyK5NLZ82zbk+KTDRrhn+rquJ1G20J44wO7QBAIKoZLzVi0klYNhtpf0nx71Jsgm@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YyLT1E/A+NZuB6SYCNkoAWYEk8e+up0x94NH6e6SSrDLUZW92il qkGRm0vcektsDd+OIylaen+bLe1jKD8YcqazOiXVKFklA19FvNQneVGc25UNPb5HOA== X-Google-Smtp-Source: AGHT+IEMHgfkQERTQRGlOpb+BBEFJbws3nTs5cg/vVMHqGw3l1oU4V9I4UiqHIdb6xos0AIFQi3guA== X-Received: by 2002:a05:600c:4e4e:b0:42c:a580:71cf with SMTP id 5b1f17b1804b1-42cad87eed8mr115519115e9.30.1726067764479; Wed, 11 Sep 2024 08:16:04 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:adf:f001:0:b0:371:7960:15b8 with SMTP id ffacd0b85a97d-378883bbc08ls1759339f8f.1.-pod-prod-08-eu; Wed, 11 Sep 2024 08:16:03 -0700 (PDT) X-Received: by 2002:adf:f285:0:b0:374:ba7a:7d46 with SMTP id ffacd0b85a97d-37892704085mr8800317f8f.43.1726067762901; Wed, 11 Sep 2024 08:16:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1726067762; cv=none; d=google.com; s=arc-20160816; b=SdfEuKPqeOPZDIHMAQNRlF+cQoS6qsu0im9lAyF1sJHuQMox789/GEXUXvomCwPKHR pZjgiD2KUfxWv9WE4IRPBRpVGkibHKJjtsKRzUqef5GE8AguvKcoSxsTVnIOANhpbIWC +VglNYDfByfluOv85xmoMzLXP09epwtoKiMb2eDFHs7OylpJGN416yTwOOU0Uyrjos+V KMwLiafpK7vMbEC3End9eL96xL0jfNtb06UCMQS7EDPm89X8KgLRlP15/7h9Yl42y6Yu G6XeBKJuSxxrxX3xdeuySuvdmUDm6BIeJ8wGAHgt/NHn740pLGD25oHarqmYdFSXBSZL xr0w== 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=tu33TDWyFYnCc7LgMbWqrZQQYNQvPGyVVYRoKDNeNzlbsfXqfbqKuU3urwNBsHeRgY Vktt3QOY7dE4uWSJZ4gzLoUJdDe58c+PuSnLk534decbU9WO+BdvQcONEhohrj2fMya+ O8yxl8Xr1EZ/OI8YQV48NfAdc2xSH3ijDaxywR0MFHI+6t4JBzo9ub0Vx+99/mIJw98M 6o6qfhMqwToG6VSWLVoOZDSjChA16cWdFf04JcLZNLXwYIJDPFY1QFZtCHB3vAWbyULY jpxNvwE/zj9Jev4ikrNm1J4hME3/VVjC+4L9u+VDsVZn8bBgWiM0V+vWTsCXqJL2/ykk EBiw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ARHacWVG; 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-42caf155f34sor31656325e9.0.2024.09.11.08.16.02 for (Google Transport Security); Wed, 11 Sep 2024 08:16: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:354a:b0:428:1e8c:ff75 with SMTP id 5b1f17b1804b1-42cadb6a47cmr98704315e9.35.1726067762208; Wed, 11 Sep 2024 08:16:02 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.41.3]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-378956d37a1sm11797177f8f.77.2024.09.11.08.16.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Sep 2024 08:16:01 -0700 (PDT) From: Dario Binacchi To: linux-amarula@amarulasolutions.com Subject: [PATCH v2 06/10] drm/panel: synaptics-r63353: don't re-activate the panel if already setup Date: Wed, 11 Sep 2024 17:15:51 +0200 Message-ID: <20240911151555.2915258-6-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240911151555.2915258-1-dario.binacchi@amarulasolutions.com> References: <20240911151555.2915258-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=ARHacWVG; 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 Wed Sep 11 15:15: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: 3464 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 BC79642E8A for ; Wed, 11 Sep 2024 17:16:05 +0200 (CEST) Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-42ac185e26csf54788615e9.3 for ; Wed, 11 Sep 2024 08:16:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1726067765; cv=pass; d=google.com; s=arc-20240605; b=jGFIymElM/FHsVP0tPRnM2O2PiFw861rm76NXHhmhiY3LDYtL7kAhpm8wwVX0FVBYd 80jUr/F8B0fmF/SBxN+Q7nOJEQZKH9JbMntPLhcZxqVDJ7W7SS15P1Vzt6hQaxJQgAtA tJ4jY95R+Cyszn5OjfcoBw1slnZnu6RN20wFTm5yFmRIhb34BtNsohZBzOz61Eq2KbX7 0lc2YTx8cymOAgUH0rsBnNU2wgRwyEbrRJWvFvurb0himiyT/rXP5eI8/n4S+gvp17+n MeSfxHdzxR0ff/UtHI74kgLzskjEc6xAub2aQ/q4pZ8CeGGjrIXPGD9Ra2oLQC9xuUQK cwaw== 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=I6FsrlXT6zYutmIEH6BudZ8Z6gBFRqP7myj5kCa6uBE=; b=Ual6d5/KUKwG9hbCnyxB4M3jzq61wJHqx/tguaJexgi7ZHfPC9Y+Djweia27tZ02xW nSTiE6ohL0uU9mRLp3GPI4+wl1vY58gEEmWZ6aUUr0YDr9uQOkQgepTLKmlamDUHyJyG B1DPew4iLdhDTS9HbviSdb1zfHI1UM3mn3XI4sbeCuyZseBGiXCqDZu1VbEMDYepkQwC jvJW04o5py4pxq9LgihR7FYfjqOkcExBAgH0NYVYjLRv6N0e93B6FcpimbI9QvKe4/xv 8MLHXgxKtPRGX3k0nJZh89ThoU7F/NGoE0W7UELTY1EfYFwtZy3eVbt8dgn+Hbb7S/EJ r8Sw==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=PkYE4P7d; 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=1726067765; x=1726672565; 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=gVCILuZdsw9e7/kF0zlAaILM8Tu1NmENsvxrgwQI1mhKNu3UINWHLX6Snt5at+gZDU MI5t6Ahj0ntGX5c8o8rWZTd1zwpCwP/BO6Lda7yyb27FdjClv1Iwbtj6PW0DgYwCWh2J BX/1wb/Lst579eTGrWKaDWCgqLEGJY9Y+Es1U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726067765; x=1726672565; 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=aZy1CV/A1kL3/Z9C1IhOD8e0F29KFFAbuwfRaIL5PCRXqVP+eiaBcxlQmnT8dpqUZu dWEQ3JsLa+ZPq2Fs1qF1cmX6EjICc5j8eG99kATNlEjBbEtnhHXeCsQjInwspxOYQwoD c/KRVRFxQ2lAUVXQqGU8UrmUS/fyABFIDkz8PScgv8pPvAYroVBxOiLZBJRHc1yy+dJz QHxOem8A9EXL7Bi88FEWb30b14C79aSUl51Mas67DSl05qxo3aPneM3GMedAnJfrQv6Q RrLHpdHmZipxleHT36pAwGIeAhubuiSjIaoPpTkpWVNQGw361G05ssBMuCOol2zaTuT6 YtLg== X-Forwarded-Encrypted: i=2; AJvYcCWzlJuwsoA8sTUqKEft+MQfbEgHYdSzTnDkUL07dyBcGcpkboNz+4nG68hXicQs2t2tvssI3dyskATB3Ajc@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YxNTIW7eLuLxZKL4dDn5IMCibPr6QzQwNxGhrPadgC5KRk5suvP 1LZLqYKY8lZkrIy/n48LrNZaH3ieOBRQ9aANDbmeqdKU2YHFECPks9Mb99v3XF5dzQ== X-Google-Smtp-Source: AGHT+IEti5iS72cEGz68W/5O+9ubaws2iLfD49yZkJ90jFTRIQPgDwBzg7wDkSuQaLy4wwyUHCDd9w== X-Received: by 2002:a05:600c:5106:b0:42c:ba83:3f0e with SMTP id 5b1f17b1804b1-42cba834410mr71200265e9.7.1726067765381; Wed, 11 Sep 2024 08:16:05 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:600c:3b2a:b0:42c:b9e1:ad0b with SMTP id 5b1f17b1804b1-42cb9e1af78ls15734475e9.2.-pod-prod-07-eu; Wed, 11 Sep 2024 08:16:04 -0700 (PDT) X-Received: by 2002:adf:cf09:0:b0:374:c651:4abf with SMTP id ffacd0b85a97d-3788969feb9mr11299993f8f.52.1726067763823; Wed, 11 Sep 2024 08:16:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1726067763; cv=none; d=google.com; s=arc-20160816; b=xZGDGNsuuUlHZSFWU6maBpQcG835nwfBLK8SRR2b0YtQKHyX7o5wf5ZXRssh8z0cht jvSE2YPX9wN6UVUg1h8hgdk24G2buFiam9cS5Z82kGFw27QlRRyzrJvzhcq0SkMUirrW mmzejBYr3Dn5DdGzu5HPa5jeFeJJSiptRUAJYFLNl0rek/SVdhCxj4W6xFXZLojWUJuH 4tb++4DSgwCez+0Z+yJ3SmMkFzzw1XTd8W4zeesx+HxfkrOhB2jVDMkWTWlPHE4iJydO 3zZ1TTyH4CD2jB4WNR8k4ycl5JFJKLBUxfJKcqdwUVAJnpXT8hMuukp4q6kFmDqGx0mw mKiQ== 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=Gr4Xmr9Z68II7U7Kvt60GZCk+YafSLlNiw5I91ywM14hUNbXRj3IZbovU/9nYZhFXp aCXCbmWEvbsbU83EXW3yk3qGIO40vlfKjoAnSaAk3QNoEPo0mm7yOuDM0aMFHot+uLsC ZdISYHP+frGGTJMP6Ag1JlkQm9F/w2ALuXgIH71IC1n0oAWSyGhr8EVmZqhopxrR2onG rPXiS5xjm20+sRx4jBl4rQqZJ2Etfg1FnjwAzZGpbd21vlasU8nxzwG+KeZWIIhlYPXe BXy9v1td49YWmAO/0zfVoEuk3izJTTzmu+cnD9lozVmCZuE61xClFcE7y+WH2AsyF9A5 DUUQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=PkYE4P7d; 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-42caf2e1e50sor39655865e9.8.2024.09.11.08.16.03 for (Google Transport Security); Wed, 11 Sep 2024 08:16: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:1e1e:b0:42c:b187:bdeb with SMTP id 5b1f17b1804b1-42cb187c004mr100082995e9.29.1726067763065; Wed, 11 Sep 2024 08:16:03 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.41.3]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-378956d37a1sm11797177f8f.77.2024.09.11.08.16.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Sep 2024 08:16:02 -0700 (PDT) From: Dario Binacchi To: linux-amarula@amarulasolutions.com Subject: [PATCH v2 07/10] drm: bridge: samsung-dsim: don't re-activate the bridge if already setup Date: Wed, 11 Sep 2024 17:15:52 +0200 Message-ID: <20240911151555.2915258-7-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240911151555.2915258-1-dario.binacchi@amarulasolutions.com> References: <20240911151555.2915258-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=PkYE4P7d; 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 Wed Sep 11 15:15: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: 3465 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 CB3C542E89 for ; Wed, 11 Sep 2024 17:16:06 +0200 (CEST) Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-42cb635b108sf16710495e9.2 for ; Wed, 11 Sep 2024 08:16:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1726067766; cv=pass; d=google.com; s=arc-20240605; b=Hm2n3B02P4oIQnUYdqLuB0JWjULOl9HknUBgkYlLDcQlR6D9PZ4tuafOt6Sjoz+Wyu mw4mBVAl3gSk9oV8dSK8Z8ZCbNgZwGgfgZXm1T8ONuJm9r4Yw9O46yaxdevoHBMn9X7I Tvo71yjc8sIBgMWpx9dqnAco8MEWDeIHMprvRDhoD88ykgmliIpoLpt7xA1+Z4hTU4Ik zcYX94RsZG9sinmvv5plhvuCdHjEORFCefeNJosxFhaXtv98DFZwvqUQoepjUDVINXdW SR7p6l5wCsuhUlbwICyNDiHjC15ZIIGLyaRfW1HWbQPXwD+eMr4plAbnDsDsCVjkWv7e XgRg== 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=IuQxCR5ayhX6E17snzHjInxvT/4G/ak1Nl98Imf35Cc=; fh=yoqnM/WsGCrfVTYvnst1/RyxrQny+ueNR32Pm2PPVaw=; b=VMabuu1FP0jBcg4rKl/mDVAdqfPexs7qGL4a46p3FX17IYpDnht5Rtt+Fs8PSz6ZLA 3mP+1Mt2EN1jYlpjhg48TsDjCfQRFC/f504imv1Ybnlug8+xFTqJTqlENXQQGm5KQl/J khjY6IH+EZYQikFY+M7gWKQLX0rsgDIS/Qbfvo8yWW3bJ3VuVqEeFFtmvZprfxygDS9w SfRMi8L12D70ou06E5gTaAAVeT5dlO13W/wi70yi7xjvmj8T4JOllzDfos9/kCRKoAsO JPqit831eZGEARx/ThkBrwEsJCncOQLCmLvuqnKW6jQ80LZ4oxnpm7CHFjufN3dzsuDt /uvQ==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=KCfbfYJW; 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=1726067766; x=1726672566; 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=IuQxCR5ayhX6E17snzHjInxvT/4G/ak1Nl98Imf35Cc=; b=H/VY2s4ddegf9N7FFTN50+2JU+68KdxWep+TaZADz++twc1NuLfIdx4MI43TZ9HY9p lEI+cVE2mbsDkwMC/8QQD4ZFK8QXn00Ycvddn0Hze2hSrZBXy+d5jxsYmqyviMbqR20u w51DjnvF9t7kLXuQmOP51nJCv1GsLnTTd73Tw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726067766; x=1726672566; 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=IuQxCR5ayhX6E17snzHjInxvT/4G/ak1Nl98Imf35Cc=; b=JfDGSM7nTHnI0dLiO7dQZgd37mIxtKwuNQVwJIuWnHBOwgyuYy/0zWQ/BS5vynxE7W qk7WUW/+MwXeBBqbOkLNDAbSAArcRZbsnuTA4PeAejlJjKGukl0OIy9VgGRGLv3WVpvm fgJDsdqzSFiZZfDLSuQ2vakqd6Hcztzyq3Gs/TBLml5HMIwI3CMLOWLb1fYM2KY+B4rP tOFKUAP9gVubf7As5hKXi9MAYdVgLZ9lVIDOKdD8gZ2fssFJtzXdn76QTzmSmxszmxhk YafIpJxJLfMAyeP4YoyhxzHJSa56wU/5td46+7hkEpXcAvTToEc4xIkr0ukT/VcE0/rC FznQ== X-Forwarded-Encrypted: i=2; AJvYcCXO0k/jWdGvM+duwlJQwKni9i46ikKxFli0ynnCnddVOimMJlxAvrRzhB1EzZ01YcIceX0HpNejrJB3tFLj@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0Yx1fRJKUropygFZpV6OaIhWxN0Rd+k4kAWW9dWhJ14J0qtIu52i xcefJrKo1SxaqzJ6Dz+u5jmAZoEQ8tigSLPGVATK2FXZ9upodCsQCHQZVqJNlhBzBA== X-Google-Smtp-Source: AGHT+IEpzsYflSqVWHGexuzehUX23y5AIS54HWFhZU+Pi34IsONE+QtaZJh7W4c1uhzeFnmbd2chiA== X-Received: by 2002:a05:600c:310e:b0:42c:bc03:e765 with SMTP id 5b1f17b1804b1-42ccd32e363mr28189045e9.16.1726067766406; Wed, 11 Sep 2024 08:16:06 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:600c:1c21:b0:42c:af5b:facf with SMTP id 5b1f17b1804b1-42cbdfad180ls11718305e9.1.-pod-prod-03-eu; Wed, 11 Sep 2024 08:16:05 -0700 (PDT) X-Received: by 2002:a05:600c:5115:b0:42c:ba1f:5475 with SMTP id 5b1f17b1804b1-42ccd35aa7amr28863015e9.26.1726067764859; Wed, 11 Sep 2024 08:16:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1726067764; cv=none; d=google.com; s=arc-20160816; b=LyY7vdlTx/WhCB9OYNBDRET3NkT39Gn5zOLdCe9HVBFTdl+3cleJgnUgpxCRtz0Zxx NCHSCgSLEUmL1LOxObS9sEhpC3ayfVYxHd0QiNmZVGVULXS9evqGSYi+QUfVc/P3Oew3 vcUChM8bgPb6vbSo5Qd7m/FP7x6+dPtNdQMCy1cf68+2pE9R3KK9pPxSu88Ffu2pyqwd 1jxW0Pb+lZ/AKRDtfJJE08OGDqFm8+eNqFO3RoNhYlY6g3pa1H+CMjXYvoMjE6l/66IQ Ts7i1D3TcC17+f9Dkjx0+cn4cOn/wFHLUx4pCtperkqj65TKgIA9SiT4lAYAKs7GEz7K Bkrw== 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=+xcIsd5LwK2xo+sOd2S9f+YFWztMVv44uDr9RWlmB18=; fh=FtQepR0uNoeKT2PVdKfTKOkvEYfwbRmoVE9BmlYw3tk=; b=ieMRIpaCLElQ9v+b0etwWvl0GF2/cdc7S7Jsm0wiZaOhxk+hKFtIsn6HAK5GUqQXtE ukJ81rg/qXL9VOh3yUo7aJOfZmfR8qoB18wIm72pES6SVNpxunM2rVTwWV9bMlNejoW7 /oaDS3OXpziwF0SteacXPiE5Q8SQ+i8h+wDjKMJk320s09jF7IxYxkNwLAeOrNBLGHNR gQGwcviD6f8ldVwrJyVib5/XCplY4jWE9ATyujZgfYv9s/fjuoilkIzVu+f/EVxLl5tN b7pUAyawu6GLb/ns5i0+1miEvrLD+YszQ4VKyr12PYI2G2X9FVT7qfW7AEtrb/oCWoBP 3mEw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=KCfbfYJW; 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-42caf2b1b33sor36610925e9.5.2024.09.11.08.16.04 for (Google Transport Security); Wed, 11 Sep 2024 08:16: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:1c06:b0:42b:a9d7:93 with SMTP id 5b1f17b1804b1-42ccd35ad4fmr26620095e9.28.1726067764161; Wed, 11 Sep 2024 08:16:04 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.41.3]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-378956d37a1sm11797177f8f.77.2024.09.11.08.16.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Sep 2024 08:16:03 -0700 (PDT) From: Dario Binacchi To: linux-amarula@amarulasolutions.com Subject: [PATCH v2 08/10] drm/mxsfb: Remove generic DRM drivers in probe function Date: Wed, 11 Sep 2024 17:15:53 +0200 Message-ID: <20240911151555.2915258-8-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240911151555.2915258-1-dario.binacchi@amarulasolutions.com> References: <20240911151555.2915258-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=KCfbfYJW; 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..a8d6dffcd02c 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 @@ -360,6 +361,15 @@ static int mxsfb_probe(struct platform_device *pdev) if (ret) goto err_free; + /* + * 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"); + ret = drm_dev_register(drm, 0); if (ret) goto err_unload; From patchwork Wed Sep 11 15:15: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: 3466 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 7EA4842E8B for ; Wed, 11 Sep 2024 17:16:07 +0200 (CEST) Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-42cceb06940sf7972315e9.0 for ; Wed, 11 Sep 2024 08:16:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1726067767; cv=pass; d=google.com; s=arc-20240605; b=IlJLYE3vRa7htbodUOV0ihXe5yJ5miS36EDcNrXENQUwOnSIF6oZYjOhFGTTbLbBXv 7SZ+IpuWb2K2IzN6lcQ+TxvAzNpU2T37c212H2o+tLXlB/NKvOTikc4i4J8ftHsUT3kc 7GJ4DvWFMhVrFuorFfKf6+NXoFJG9XYP7p8Dhk3n99849ys+OL1uD1kz9TxQLRixQ57s CftZrEDtO+FGmOI33HhwGvbaY/nRW1uqCV0gAeT5u4PlZwq185ORcpWmjHXN0KchfCs3 gLe501wzDdfzk3Gm8GmMZmOPY9tRD0EOKoYDKgwc2GvoZfE7rvceTbzg6KDSECYKvW1P Twmw== 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=cuXmAMRpiUCgGpH+r8yCSQpWe7CZTpNqcfP2Mv4PBBk=; b=dcxsTM0qbwrgvAwhdU6Nd4iY4y89He6pJAOxhwlxF4pa5wkgxy2bi6n1BO+gWsYjgh x24Wf1gjC6woBiDqUdXs6QhR5PeKqo+qJkwsD/eAq6wJ2I6CYaOHN62YAMV/0Cwe5Jim 6ONoC/8FXt+e6Dg2OPBxNKQothuLb8IZPdJuc2i9ZT9Ycho6rQR+qr0qW17NP3fSToJz gBOG5BAggEjPggpCUEN9m2nDgMr5IxT2ZFKhwd7QSFfr/tQGe3Gm11j4ZJ0vJb/Jj93C Bx0gWmDrk9f0EPWXo9UwdLZZPgOKZPsUEAOExiqFu8uKxG3HfSkI6GxkR3ksUn55ANjc 35Og==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=hFr3dUCz; 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=1726067767; x=1726672567; 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=iWJ8qpWJLZ84VImrjSM+jtrz5gvu4iglpPwtPHSzHNGUpHdoFSCLmDwwotOr40cLxN PhE3yWglY6IS+2xdYifuUFy/45gqFbEQJXKInNBFtdHwSDezZzw5tzFEZRLKADPgdPGe RWeBConCcB6B/heghRspH8+SbzttcEa76ZbJ0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726067767; x=1726672567; 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=SeaLIQvGHAkskxc7YJ+hu5ywBLZDcjWucCj23W+KFah7lAJiMXe7rPMZRovqFPQ1MY KWXqMSk6QdH1NefBeWsT3P0Xx4zuIQt6PY8OZK/Upfi8/FZ3T2Pj9zPJA2HbfoHh/TwX S7Knvsc9oE4Ux5trHRNYThyiawjyqCxpuwewquwf9A53S0w0Z3wPb+33eouQYB0ADVmg qR28Z3gEAIlG0Ly+E4FvW73qe96lXd5gLanrNqe5cpHD1cJidL5LfDqi7961ObY+sehx tfvUUKrRu5RGdlwUJQOJGXDBCUz5jW3F79ny909K22u20liCjgtcy6NOfvm730Gti61t an7w== X-Forwarded-Encrypted: i=2; AJvYcCWQLHm7hbJ0GKlaw+r9WJAZb2xNdy6MCnhc0Ox1wYqgmNaWDKxUOE9a1SS0v6lnYOeXZ9BowE4HlHpQIMH9@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YwXyceXxU+AqmPb0Ab9M6KVSCPuNc3otfyC3KC4Vee6mIAgMCSx Y/0MQTqFXvUJG0xOn/xOAB8vM96ngE2GVIeak0+hMtJb8WJlHf9kv7mOqrqN0sD9PQ== X-Google-Smtp-Source: AGHT+IFoEfYKE6Ckxt31n2Yrvw8hWVT+uckFX8klqsE0mb6fOtlXDh/1MlE46uWKHobzA5myKaIWLg== X-Received: by 2002:a5d:69ca:0:b0:374:c3cd:73ea with SMTP id ffacd0b85a97d-378b07cf82dmr2059259f8f.35.1726067767136; Wed, 11 Sep 2024 08:16:07 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a5d:564b:0:b0:374:d287:ec15 with SMTP id ffacd0b85a97d-378a8b7ac34ls618797f8f.1.-pod-prod-03-eu; Wed, 11 Sep 2024 08:16:06 -0700 (PDT) X-Received: by 2002:a5d:4306:0:b0:374:c50e:377b with SMTP id ffacd0b85a97d-378b080cf8cmr1939784f8f.57.1726067765730; Wed, 11 Sep 2024 08:16:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1726067765; cv=none; d=google.com; s=arc-20160816; b=pMi5xWUOjjw0HYq9mon84GckI1GoTlT2Otvt/h0H/CmWeG/Q8u2FWmexbE/DUn7ST9 h+FxtCjzjc2atiltca2PiXmwXeSlkhDD56witGbj4YVsILppT75uVjhXUpB0ZdtYLDlc y0mi1xC9K+Ne7a4ySpKIUrjx+gQe31yKPyP3/V8ZtMhHSVIBosieZwpIVKcFnPDDoiVS 1Z10VPXc+GFpesPTnGF5OcamF9oKbBEWYzdbzwJK56pM+/GBCjhrVlcZIQjqoX5zhy0f q0BEfFBNmIFrjiI5PvQdwJgWlhMzhW1cm8Fr0c8j3/jc1p3Tp3ShPH+aIjwWZ8GhZVqL P45A== 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=X04G9AuHEJRBZqTVoixoRih5Yl7zHxVdlv55Qxx9gERTNoUt949xbGCd73nS9p8BDt 8wEdYpD/P0Hs1WoG89uPlrtraaDu4rHDwAF/qlgezySAVGMcTVrw59hRqYrZsqerfNEP sM82BBb4zyfAj07F3WnfPfwLpa/0b5Xp9kqXpItdM6omO/4AyZ91Z41jk9mD2A6GLTYj C/hzgTlLXp8hlZFhUG3FqTMIvF8r25rEyxD5rkRVkeaba6iR4GO4dHsoddUFtPSLRK4W 4Pu3t99J8y+nwjmPb+Zo81jD6vapYB3x4W3k4Nn1CZYaXyvoT0b3Q7AokUJhJghKgjZM s2nA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=hFr3dUCz; 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-378956de59csor1977803f8f.10.2024.09.11.08.16.05 for (Google Transport Security); Wed, 11 Sep 2024 08:16: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:a5d:68c4:0:b0:374:badf:966f with SMTP id ffacd0b85a97d-378b0796d4bmr1913684f8f.7.1726067764972; Wed, 11 Sep 2024 08:16:04 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.41.3]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-378956d37a1sm11797177f8f.77.2024.09.11.08.16.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Sep 2024 08:16:04 -0700 (PDT) From: Dario Binacchi To: linux-amarula@amarulasolutions.com Subject: [PATCH v2 09/10] drm/panel: synaptics-r63353: Fix regulator unbalance Date: Wed, 11 Sep 2024 17:15:54 +0200 Message-ID: <20240911151555.2915258-9-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240911151555.2915258-1-dario.binacchi@amarulasolutions.com> References: <20240911151555.2915258-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=hFr3dUCz; 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 Wed Sep 11 15:15: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: 3467 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id A43693F263 for ; Wed, 11 Sep 2024 17:16:08 +0200 (CEST) Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-42cb6ed7f9dsf32399645e9.3 for ; Wed, 11 Sep 2024 08:16:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1726067768; cv=pass; d=google.com; s=arc-20240605; b=BJaSbySNveAEfdVozJZbWDb5YnPuaNzH4W1h+Bj5tSuigNCxu0FrDyoshw4PeJEmdI EYXriuGopg4Scvk2slvcaAbBa+PV0MEeFta52E83pWWOu4Wzvw1ayCpdNs/dMVhlG5lZ k46LHSgV7kZntSNJJtiatbJ/9bclM2Pgvs8pwTehfKWs6LoW+lPdPPXuySi+H7AXbs5W hH1BspMFzihohQzaA1JIVDQXGNE7Q7qvUjmyrDzmflSQ+AyfyVlYr0ESGhMSvdRSfHZG LHSRpnEsgqlvXgUSAfY/wVUP0VCkYcVmTZ5iXJ8/tQI/vYAQow9iLfUuWAHKPXcXrOii 6hfg== 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=U6HYMtRKk2bsFEqc1HsnQLlE8U5rM4y9Q8sqU+mCwZI=; fh=PRnEsa4PoSj+3kiZw4G8fb8N3LZZZt+2NM+HWnOftAU=; b=T3YjkV3V+fojFukJDrM/LgDgncI/oOieKZWFSO2qXv1yKh+huwIEj8hmwyNRfpPZzz 5CRvirgDiVtQUz9jgAgLNGGadpN0HP9iQaaVCpPr/ZJxJFrwlLkho6qlF+IwNCd0lpe9 rrebRdi150a1vl2VMZ7ynSbDraTDZ+gOcCr0sm09xDSjIJF94yf4Br5mQKX+K6lj5jts lEmFZgi+GTG5lmkZg38Q6uznS2TwpU1nApgIgpMYzE9nlOSTUD94bkNTnf4PdJ+3RHvV PFGlJxkbYrB5Kz8lvNksxmn/tz4tyxDE/FnbYD1oWrokbV2XdTrRPs4KRqsJF17mOEPI G+DQ==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=JkhSBbVa; 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=1726067768; x=1726672568; 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=U6HYMtRKk2bsFEqc1HsnQLlE8U5rM4y9Q8sqU+mCwZI=; b=hrnGbZ3ulzbOpdqnyI/F2XlnSc2MdmntejKklmpBCFfG0qZbFaQq6UknpU9lbFmfEM vaX5KV8JkWc5qt3t4aEInubM6aQuFJ4Gug7iHgGkmYNxFOjdZT1ieouGgQtpv5DiSUCo f88Lxj9WfsYjrngiRgUuQnpWh2kUKYCJTIF+E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726067768; x=1726672568; 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=U6HYMtRKk2bsFEqc1HsnQLlE8U5rM4y9Q8sqU+mCwZI=; b=SnmBHFyIatJevezSNvcEzA3C2q53jIMtIQi8fJh4HLkhRvVIEbBZ46Qd+NRlgVam6N x9viBTfMlcHrIAsABZgYLYbQIiu7zQK25anFid4858TKsBWJ0YkUniW01EKa5C6ATzp0 +FFrbtR5KpkdCJXI+0Beia2dEgP/I5GPmhToBdnWAvQkbMVUeC5dvm1zmkNwYBJGO5Jx IvByuN0CXkJlBaNaxp+U7vh+s4J8MHT6Toy+GX+GoM6IPHA7K0u6KNH0j5ADg4SbM5Ay zCMlD9ykMMQn8CxYT/8hZSeoVskmEPsVay07yF2KSXB9CRQCk+irTvbrlpmNSvAfF7h2 p3RQ== X-Forwarded-Encrypted: i=2; AJvYcCXDgkHeAMCU/uFecmlX6oX7ZuAUhRqHTXs2hszBSxGE2NMg2Ym78h4i+gli814QyvOc785ofYYa5fnmj0Wr@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0Yz6FjvYLYfj3pSEmXwj1b7+jbMch3i7W+hU+UKkfXkypsId/m+c saPRWuighMpecpoRdHlmt77HTWlNtliFoYY+tkIXr870jTrn17Xy4bg+UcwjHtBewJV7KNUg6A= = X-Google-Smtp-Source: AGHT+IFrDXxIJ1GiSEYoyacmX+pBszp4sL331JSIkwH/Pe8LoskXaQT0fpVgqd0Sfq2AG0/C7t4dZQ== X-Received: by 2002:a05:600c:3b9a:b0:42c:aef3:4388 with SMTP id 5b1f17b1804b1-42caef34492mr124615555e9.6.1726067768251; Wed, 11 Sep 2024 08:16:08 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:600c:46c5:b0:42c:af42:6407 with SMTP id 5b1f17b1804b1-42cdb3938d3ls12025e9.0.-pod-prod-05-eu; Wed, 11 Sep 2024 08:16:07 -0700 (PDT) X-Received: by 2002:a05:600c:1c18:b0:42c:b74c:d8c4 with SMTP id 5b1f17b1804b1-42cb74cdbc5mr110915775e9.31.1726067766645; Wed, 11 Sep 2024 08:16:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1726067766; cv=none; d=google.com; s=arc-20160816; b=j5Yarzc3QeMcXAKwyy15tcG69HtvY2AuJa34p32tbSvVTsprnyaHrMSb5X/3y6ZX/P 8ZL/73gBeBFB/KhD+YmFxHQ686dDgSsxO+Tc6z/1YWOmbg+AWAcXjtNsayQPz+es+n8s ZX3ovBCh2+uC1slPC1FD3J7eTDzFgHw9Q+c5Wu9VrNg+Av1jgwSlktmiXvd4L6lyK28T crZbhG6bnwzSSxHk16d1INHy8wUjH6qeF7OviTABhsSSXa7rEfpz9a+VYeK9oLoN6VFc cwHt3lIsc3JegFUJMGuDwSYfLnWQ3oLXUr+xEfD43AW0+SbbNmkHa3dHzf9KPiNMyxhJ fKoA== 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=HK/ekdjlbs8M+Qp23n5ddreOPOJZwmCDIo7Ave9ZAlE=; fh=FtQepR0uNoeKT2PVdKfTKOkvEYfwbRmoVE9BmlYw3tk=; b=VTvS+4kTHa3wvT3iYToz5qYP45J22WkVZZerhbrAfw0kNtK7WsGD1aUOs/0zCRmkge Z0gcXLKKKO6q4Y1SUaLpDDX+Yz40fsYfUGj6HhmLeDuvC7jfN5GzFY1VG8Wc81fAd/KC MuSWeArD165WBYqy+btmecxsF/W+NPyusQV0fV43lP2dmpmSamZvvL92YFfqCru1V+i7 qE5S2/w/mjjByFyQRiud/SRNmosl4wmBc3JJ5Balev5EhStcZ3UWqxCuQNkCtK5S09MM RsiX6u3ESbX5POADgmI5rBD8CSk8AGJegZM90ZzZQ+DdtHMJfCscNLGmW19glA9XMHQG 4Bkw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=JkhSBbVa; 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-42caf301b44sor47406835e9.10.2024.09.11.08.16.06 for (Google Transport Security); Wed, 11 Sep 2024 08:16: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:524c:b0:42c:b555:43dd with SMTP id 5b1f17b1804b1-42cb55545fdmr117431555e9.3.1726067765966; Wed, 11 Sep 2024 08:16:05 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.41.3]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-378956d37a1sm11797177f8f.77.2024.09.11.08.16.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Sep 2024 08:16:05 -0700 (PDT) From: Dario Binacchi To: linux-amarula@amarulasolutions.com Subject: [PATCH v2 10/10] drm/mxsfb: stop controller and drain FIFOs if already initialized Date: Wed, 11 Sep 2024 17:15:55 +0200 Message-ID: <20240911151555.2915258-10-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240911151555.2915258-1-dario.binacchi@amarulasolutions.com> References: <20240911151555.2915258-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=JkhSBbVa; 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 | 14 +++++++++++++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.c b/drivers/gpu/drm/mxsfb/mxsfb_drv.c index a8d6dffcd02c..563e308912aa 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..d064a2bb65df 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); @@ -354,6 +363,9 @@ static void mxsfb_crtc_atomic_enable(struct drm_crtc *crtc, u32 bus_format = 0; dma_addr_t dma_addr; + if (mxsfb->enabled) + _mxsfb_disable_controller(mxsfb); + pm_runtime_get_sync(drm->dev); mxsfb_enable_axi_clk(mxsfb);