Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp97500lqh; Fri, 3 May 2024 14:47:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXlsPeC0jMo9xDg44XQxuqzsNI2cMVTw3bFP4mU5+LXLJ3nmZ0L8UhsRiQI2qXvvnys5PDO/sG59WNo7dZjp45r4rf3qdMB0xM/Px2Cww== X-Google-Smtp-Source: AGHT+IHkhmEkLcGbagteQPuYuZG22em/BZKlIB5+j3UaZvtGPGy2bw40d9OcVXl8OnIbVMiXBFZb X-Received: by 2002:a17:902:d512:b0:1e4:4887:74f0 with SMTP id b18-20020a170902d51200b001e4488774f0mr4496534plg.36.1714772852833; Fri, 03 May 2024 14:47:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714772852; cv=pass; d=google.com; s=arc-20160816; b=jZGxrnm3qae31WJCYxRb+K2EQEBgRy/S+F6nX/zidWSzTcQDiVEO//fh2BwSgJKdCW 2dKmkY9EGuHRRDzi33dHnyLX2ISZeGv0qqiyY8roMi36lV9GVCXVmgLQw+sI4I67bxi9 XujjKnEUSgRygamZW8Pnp2JacoNVYEEj+OsFTr+Ju3ypW0u/c5nE9vig+qom61JEx7pO we20dEHNpmOa7oiTIwQq44WMvTZZtx13ODSR0hZZc1ik9NUUnb9XHCrhpzoLP0Y7ODbP oXHfErjq7wDPHCVVijJWaPdIIczACoEv5uS+kZgULgjSg88QPVCTEOqfoiDTMzw+fS3O cBZg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=X9J+mwbNCcE7m50P9Dlsv1H2Zyb5eg1SoTrNCCSKKxs=; fh=ePr32O+TyLjhR6ibxeFlF9P5egh+CSEhPSyMuAeICI8=; b=QnMpgcsNSxGnmcUlnr5rdhZ2m/nUzp02VmBh4geRm2qtorhzPJPBZYatuVASBFwH38 7qQ8L4hjQTOwG10uwujfIAnKp+eSSe6ylJLcLy1AuldEu7Visf2WL/khYebIu51P/qL+ zlUx8U2v/hYS/Dd6yvD2w3kTI7kDfD3ePxpbpZmuJdam0yr5mV/q9dF12Pivg4DRPiuj 01NZgepP2iqxC2D4RkJbLVRoXBggLsif+q9teCOav/YIZGLNyQE05gzfCCX3tox70pNj 3JIhBmE+dhwILyLR8pB82cQw0wsjx9C9Y9i4okF+KbrX4+UPQNjEaPjQ2n0IKAtJvvOz KzNA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=dctPQnKg; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-168311-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168311-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id e1-20020a170902784100b001ed775d3db8si421552pln.362.2024.05.03.14.47.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 14:47:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-168311-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=dctPQnKg; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-168311-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-168311-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id EFAE028680E for ; Fri, 3 May 2024 21:46:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3016713791B; Fri, 3 May 2024 21:38:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="dctPQnKg" Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 07819137766 for ; Fri, 3 May 2024 21:38:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.179 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714772294; cv=none; b=rpYhCnkK9tbbnGMK8CQEI16MKMPTsA9v6qZYcJmxfnHOl/UtzwSkAr3IRGVzRVfjVVBzzMs1ITEHaQJE2exUJHHzmKwuEzh0gAbW2TFmtUEmi8RPLkSA5bHVWeA1zivr2bxz4lnEM6L+TLoh+7pdkvz53iBrEZVeEYptkh3klkQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714772294; c=relaxed/simple; bh=wi3nhmfubaEs7FDrXqrqYUjUQwr5WxQmbUhvxgTasvE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=eO4oIf7l4uCV2v964HNkRqT5sDfN7P9ZohabygVLXDswzIQ3EbwtHvBLyhAJdfDfXnljO7QdcUzvEOpVI/Cvm3OermssquDnhfuy23jJlRTBDvefkNJ3P6KZ2DDUUULwWkBpUxZU3q9t9qttCa3iNJdG3ElZrqHnJhU1J64R9o0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=dctPQnKg; arc=none smtp.client-ip=209.85.214.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-1ecc23e6c9dso733305ad.2 for ; Fri, 03 May 2024 14:38:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1714772292; x=1715377092; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=X9J+mwbNCcE7m50P9Dlsv1H2Zyb5eg1SoTrNCCSKKxs=; b=dctPQnKgta/9VLmEkKA7V7Bmlord9jpRKM7e1lcSKJqOTSJAvvU8MUPsee4Jf6FnEQ QAHfnPXR7oyyUveBYTozIAO8ztruoqKNHQutO5r7tFU2f0V5yCplDSdBq7TpOYZPEkbV SWV9nnEX6xBfTCLDl94DUekp8h1OYMmM0OijI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714772292; x=1715377092; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=X9J+mwbNCcE7m50P9Dlsv1H2Zyb5eg1SoTrNCCSKKxs=; b=F7vNHpxP0InFUidowu47dkfrMYd2LpoWOm7R020h2J8AzriEZDYgra9jH6fCsLm3x4 w+DuF8bjZFKORIRZ2mm5q+zRE6YWKORlSNrlaip3l8gCyiIocccQpIaJVzqyX1/YuUUx 0FXwZA22aUJVW4c4Qyqa/oElAK3+pFUau2xN4e+e4C2MsaS6kpVOQ36zWpiGY0DGDhS5 1Jqn4aHbQaqrGNe1HYz2qjrfL4+AGVDb1OdzSdszp4ueG1Tlgb2INlMHA1SylLCCx2ge ONsyQxQfTJDJpZcA7Q0bde/DMj5CnX5z+qzGzuLtaRWHZIIeLkEmiIYHnhYO32B4Uz26 prsA== X-Forwarded-Encrypted: i=1; AJvYcCWKbfqxy/5TEboS5bOti0NfhIyBn6JsX8QOI+wl2uCUMt2SFbzVHrYZvvfr22GIi1YQHre+fiJN1wyAxRTW5R61PyNa8uMSQv/0bW1k X-Gm-Message-State: AOJu0YxciW4yP84QD804r1ElUC0YL58HnKOV6Hq9eUfLLWcZ9gbHwIac e9vDwxv4Vr8f5Y8Qi6mJpgBOkTxK4YmPmWo9xk6vdaujDBQE7Ev0VI3ZrmWvTQ== X-Received: by 2002:a17:902:da8c:b0:1e3:cfc5:589e with SMTP id j12-20020a170902da8c00b001e3cfc5589emr4661779plx.64.1714772292404; Fri, 03 May 2024 14:38:12 -0700 (PDT) Received: from dianders.sjc.corp.google.com ([2620:15c:9d:2:fb6a:b54b:7580:64f3]) by smtp.gmail.com with ESMTPSA id j12-20020a170903024c00b001eb51a46f5bsm3729134plh.43.2024.05.03.14.38.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 May 2024 14:38:11 -0700 (PDT) From: Douglas Anderson To: dri-devel@lists.freedesktop.org, Maxime Ripard Cc: Linus Walleij , Chris Morgan , Yuran Pereira , Neil Armstrong , Douglas Anderson , Laurent Pinchart , Sebastian Reichel , Daniel Vetter , David Airlie , Jessica Zhang , Maarten Lankhorst , Sam Ravnborg , Thomas Zimmermann , linux-kernel@vger.kernel.org Subject: [RFT PATCH v2 46/48] drm/panel: sony-acx565akm: Don't double-check enabled state in disable Date: Fri, 3 May 2024 14:33:27 -0700 Message-ID: <20240503143327.RFT.v2.46.I6a51b36831a5c7b2b82bccf8c550cf0d076aa541@changeid> X-Mailer: git-send-email 2.45.0.rc1.225.g2a3ae87e7f-goog In-Reply-To: <20240503213441.177109-1-dianders@chromium.org> References: <20240503213441.177109-1-dianders@chromium.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit As talked about in commit d2aacaf07395 ("drm/panel: Check for already prepared/enabled in drm_panel"), we want to remove needless code from panel drivers that was storing and double-checking the prepared/enabled state. Even if someone was relying on the double-check before, that double-check is now in the core and not needed in individual drivers. The acx565akm seems to do some unique stuff with the "enabled" state. Specifically: 1. It seems to detect the enabled state based on how the bootloader left the panel. 2. It uses the enabled state to prevent certain sysfs files from accessing a disabled panel. We'll leave the "enabled" state tracking for this. However, we can at least get rid of the double-check when trying to disable. Cc: Laurent Pinchart Cc: Sebastian Reichel Signed-off-by: Douglas Anderson --- Changes in v2: - Split removal of prepared/enabled from handling of remove/shutdown. drivers/gpu/drm/panel/panel-sony-acx565akm.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-sony-acx565akm.c b/drivers/gpu/drm/panel/panel-sony-acx565akm.c index 3d6a286056a0..a9a545a56404 100644 --- a/drivers/gpu/drm/panel/panel-sony-acx565akm.c +++ b/drivers/gpu/drm/panel/panel-sony-acx565akm.c @@ -454,9 +454,6 @@ static int acx565akm_power_on(struct acx565akm_panel *lcd) static void acx565akm_power_off(struct acx565akm_panel *lcd) { - if (!lcd->enabled) - return; - acx565akm_set_display_state(lcd, 0); acx565akm_set_sleep_mode(lcd, 1); lcd->enabled = false; -- 2.45.0.rc1.225.g2a3ae87e7f-goog