Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp1211018lqo; Fri, 17 May 2024 14:37:53 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUl84pSkyR0edcEIzKAbXN6tV2gRPniwgcFnzWV0AQYv3PsDyBsS+2QhS+YoPjUw/9rt565psy9cGgeJ+7u2Hu1JK8LyKEwifOrXXwuHA== X-Google-Smtp-Source: AGHT+IHFTJEBQXeZoAX6TCycz4h2LJav8lM7SzS35Mt9nnYxrelwHcDZAtYwkpCWqjJU5F1Wv0Rr X-Received: by 2002:a05:6a21:150b:b0:1af:a45a:a8de with SMTP id adf61e73a8af0-1afde0b5a00mr23894394637.5.1715981872900; Fri, 17 May 2024 14:37:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715981872; cv=pass; d=google.com; s=arc-20160816; b=EvgPGFLRZytK8BotQS346lxx12nMTWpmiEh+kithAC/+meUlPUilW9nzwJ0SfUj9yi 3pyFTrUaBwun9unmtfUaNi7JN/AoU71fsI2w8G09ocA+0hjOpvt2/d1lC5tgu120CFSL pDybs7hnPy59Zrs3g01D4Mu4hSlefpzbaCQ8sZHnYXXHvcmTn3oO8q6sMBKM2OVzhxrG 49z335pKY094SCqc8vNdIlI2x/GZC1/zk79TI/VhFpFC+TYQpxjLlWh2eEf3QhrFnQvR AW1l5mJCqZ9YkUkH1H0B7c+BLXQf7ueSQYWl3Kvh0H145s5adF8R97ynRZGsAPNoYcZD 9ddg== 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=2eNLlQcUGr08ustxm7tjWdAeIcGj6aFrRwLzzw2mxSA=; fh=QkPg5CWwQmhBS4SSuhWfZg6C6YbeDv4z2RAkyhMChDs=; b=OrveOO51nbRHEI0SHI/uuSkZwuUNw0AtQDFD5fLVZevGL9RMoOAySJK6iVm98rW0Nm RlZY9uAIhpgt3tsyRRhRV0iEu6ySPGpmdSRcM3EnzRt/1rkHM1B59mjRYDkkrjUuDMbf CvIAXIfmTTk0PCVVSHb+WFbNYkv+3xT06Kv9f3ggA6WpbEaB7XC9Ms6Y1PSldVY54jz8 zSvSPNccU8zGVVdeS3GFkGErTqTSi7fBAJqwLtA++S4ggros3FdC+TocJ5byXRoPUJDf +tjnK/AL3iJ1alIVtuBBtmAk8erhj91MBtWWq0X6YKJ5mmxTzGyhfRTC1Gn2cYBb6tZu yO1Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=L0uJCF4t; 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-182644-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182644-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. [139.178.88.99]) by mx.google.com with ESMTPS id d2e1a72fcca58-6f6802a0227si4214425b3a.329.2024.05.17.14.37.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 14:37:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-182644-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=L0uJCF4t; 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-182644-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182644-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 862D7285D00 for ; Fri, 17 May 2024 21:37:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C24BA1419A6; Fri, 17 May 2024 21:37:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="L0uJCF4t" Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) (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 9E921140386 for ; Fri, 17 May 2024 21:37:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715981859; cv=none; b=aiGUxrTGJA1AcTmR40VVhJdX7nD8wzQ9CnJIUTmBGSFFyXuzVN5OblW4wB6+RnaIE5l4BZ7xaXl5wUn0Jow/Zh2D/8Ex/d1GYjYgKVNz/jyk2hYClKkYR7LTE8QtOi6EmwkGXagH+cWDy40Gsn7GsaB0Yw/S4bTm3aammBn9kYo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715981859; c=relaxed/simple; bh=NFKnwk8YhaKiKsasz2Pc1QstgQ3vuU/bihNQbDltpio=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=my1qq0B3JXRe2ZLucKBoclMKRF/YRPGiEzP/dRpUQCbM/6rAgvJlkUP4dSwMu55Ehhw2+rr8n/90aXBPWTTMTBrzgSL9jYCacrUtWAAkLBgTtpYMF+PpTXxdZUKffcsiJQVTy17BDg0++WO9mE6XMSI2abeV0T8xfWe9FUQgnGw= 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=L0uJCF4t; arc=none smtp.client-ip=209.85.214.175 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-f175.google.com with SMTP id d9443c01a7336-1ec486198b6so20808025ad.1 for ; Fri, 17 May 2024 14:37:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1715981857; x=1716586657; 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=2eNLlQcUGr08ustxm7tjWdAeIcGj6aFrRwLzzw2mxSA=; b=L0uJCF4tnJQTmB2oP9nepc7lJwa6ikUmwOzeasaArBqpimF8qvJHNLEM+dEMFo4JgG nNwMowETyyypstAhK9+oBbcqwYasj2rwemFser/XQImMwm4m0VWW2i1+/Ed5sL3JD04H a3cVFu404VQcf9KxoNphVUVQpm4VH74i1TwVU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715981857; x=1716586657; 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=2eNLlQcUGr08ustxm7tjWdAeIcGj6aFrRwLzzw2mxSA=; b=C542jcBNJFv8RiNFb1wor0LkWyqexuHOXAmjSFk8v4QMqtYtC8/j+Ow0WoJGxkk7sp ZlfORer2WjA07webil22+HK+hXP5MP0ddvuf0Q6GaZ/atd22w74No5fRYBrjP+42CQMS Rl5yjsqDl2k+Te3654fbbvzLd1ba2CFHJ+6zjpp913gdlKTRnKHDoNrHxtNYM41FY2ec /OcWcbcuBLLAzqjYJfVIRS6n0AlIxlls5EF4N/IlLKQv6ebeqf0cKKDd2UCkHEY8/2Qs o5lSBsleIYw0BmQ/OOU4Al5HYBC+MCn+Oq6ddsEe3AlltT72HFvjlKq5guyQvnG1qDPY NdOA== X-Forwarded-Encrypted: i=1; AJvYcCXtkpb+V7qffRKVfMDgrNHtgBCzSzTYhOaURv1XFKbJ5f0zQ1v17LYiT3oORymgkmZmX2qgBoE8xGVdpavHdo3LsCQpX8BJ9lKsuByi X-Gm-Message-State: AOJu0Yz5/JQJgkQM+gMh0LBQZf4HLxS0vC5E4jlhd1/UoXoEeHIArBD1 lLpPO+e95YgD0DPUyKfaV3+kfvfuu2Vf320ilOaf8YBrV6Uu7hwGSY/4xsbySQ== X-Received: by 2002:a05:6a20:3d81:b0:1af:e649:6f4 with SMTP id adf61e73a8af0-1afe649086amr21555290637.57.1715981856849; Fri, 17 May 2024 14:37:36 -0700 (PDT) Received: from dianders.sjc.corp.google.com ([2620:15c:9d:2:26de:b1dd:5:771c]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-6f4d2b2f8b3sm15168736b3a.211.2024.05.17.14.37.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 14:37:36 -0700 (PDT) From: Douglas Anderson To: Neil Armstrong , Jessica Zhang , Sam Ravnborg Cc: Linus Walleij , Dmitry Baryshkov , Douglas Anderson , Daniel Vetter , David Airlie , Javier Martinez Canillas , =?UTF-8?q?Kamil=20Trzci=C5=84ski?= , Maarten Lankhorst , Maxime Ripard , Ondrej Jirman , Thomas Zimmermann , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/8] drm/panel: himax-hx8394: Handle errors from mipi_dsi_dcs_set_display_on() better Date: Fri, 17 May 2024 14:36:36 -0700 Message-ID: <20240517143643.1.I0a6836fffd8d7620f353becb3df2370d2898f803@changeid> X-Mailer: git-send-email 2.45.0.rc1.225.g2a3ae87e7f-goog In-Reply-To: <20240517213712.3135166-1-dianders@chromium.org> References: <20240517213712.3135166-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 If mipi_dsi_dcs_set_display_on() returned an error then we'd store that in the "ret" variable and jump to error handling. We'd then attempt an orderly poweroff. Unfortunately we then blew away the value stored in "ret". That means that if the orderly poweroff actually worked then we're return 0 (no error) from hx8394_enable() even though the panel wasn't enabled. Fix this by not blowing away "ret". Found by code inspection. Fixes: 65dc9360f741 ("drm: panel: Add Himax HX8394 panel controller driver") Signed-off-by: Douglas Anderson --- drivers/gpu/drm/panel/panel-himax-hx8394.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-himax-hx8394.c b/drivers/gpu/drm/panel/panel-himax-hx8394.c index ff0dc08b9829..cb9f46e853de 100644 --- a/drivers/gpu/drm/panel/panel-himax-hx8394.c +++ b/drivers/gpu/drm/panel/panel-himax-hx8394.c @@ -370,8 +370,7 @@ static int hx8394_enable(struct drm_panel *panel) sleep_in: /* This will probably fail, but let's try orderly power off anyway. */ - ret = mipi_dsi_dcs_enter_sleep_mode(dsi); - if (!ret) + if (!mipi_dsi_dcs_enter_sleep_mode(dsi)) msleep(50); return ret; -- 2.45.0.rc1.225.g2a3ae87e7f-goog