Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp1211314lqo; Fri, 17 May 2024 14:38:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW8f+/5+guJK6epBpEasIVWWplftgStWj5qx/HFvR9lI1ftd2iDxh8RO1nQyl4VvglbAKMHAaC8XnsFjiwfVZdbGlcXONHtg8rdce6sow== X-Google-Smtp-Source: AGHT+IHj4C7ijzuFbN/AhR9WcayoAmnziKNi/mpP8tLC6x7S0rYk/pJMXxGGzxk+n6LMM9KgX4pM X-Received: by 2002:a05:6a20:101a:b0:1af:a4bc:1f71 with SMTP id adf61e73a8af0-1afde10de4amr19781830637.26.1715981918170; Fri, 17 May 2024 14:38:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715981918; cv=pass; d=google.com; s=arc-20160816; b=L8YP+ri/s50OQnQjVLLcoygG0mI8GEHIMIwFQUGGM/cfzTvkUD9EWhqh3eZQX4hHQA 4hLP5yq6jbQ/Zc/SGlN9nPezD8ycTdwVhjI/IO/V2R3ivR022i43ZRyb0oPWeSCtTzI7 m46mbIlrZoM/G5luBDEFQW68DKYwhhZpg2y4rcPeZBfZZy/1Ihayz4x5LuLgrZhvZfhA pq5ho1BSerr9zuHymD98n4n129HH7XBUp5EyTRhqQiXWpDJ8wwDXLCd86UVwcpGoqqSw 7K7sRL0yVJf6fprUPa+ZytEGGf0VBHfCx5GRukTLA6QiAr28bWEP3N5QSGl2Jo6OBQwI bAJw== 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=VOCpqzi3HqgLjpNBxA0mBkV791uaa9LyaeXWVqamirw=; fh=lhUP0B2rHwbQJJS17g2nLV3eVG/vtfnNvBEwsfitjWw=; b=KXm/xQblqzAuzwjfUkqfTwSCvMgD6hD76hWWqMXbZ/nK6RbAKKN5IRti+sFvL9OaXg 9fNVINqQvCdb+LDvsSog7Vn5q8UzXUt0WpmhoV+1PJpp3boDUWZUusOW8MNjskF49PWj wTQ/BhGse++NwZlISq7lbUdrWy8aikQADvzYbYg6ZWSwjRET8uM4QyPPhXL/wBxOXGbY UwVRFfRjiINxT2jJAnG8ZRBN9YMFXjy+T/o6aTZHFr9031GuPdTyd36pMNWsqWq37TYJ RNHp7Bjps9pwigBwkFoO3AORIRGsyoIVjovCTpEMTPFIa1Q+qDfhWfc6QClv44C081mL mHPg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=mi7xV7Sd; 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-182648-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182648-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 41be03b00d2f7-64feec3b74asi7387256a12.407.2024.05.17.14.38.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 14:38:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-182648-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=mi7xV7Sd; 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-182648-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-182648-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 971B6285DD3 for ; Fri, 17 May 2024 21:38:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B11E414262C; Fri, 17 May 2024 21:37:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="mi7xV7Sd" 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 896511422C9 for ; Fri, 17 May 2024 21:37:44 +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=1715981865; cv=none; b=FMATqh6065+Up1UAaDdkhcYUy1oTVcBWlNatnp7Ng76Ipiy0RyvyOXPARcDHdcxVDeCN/hfgsaTV1pUMLZTzUI0d1DcRk/7RvcvmjO2chI5KGHOnDDTZg2iIjiZySIwCDUHj1KcYdr0AexGX3p8kF8Uea+e+2oXKe7d4dSIk9bo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715981865; c=relaxed/simple; bh=K70MRhubaL7E70O+JgiR7Yf5st7HgO2JT92PC9Ya7Zk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=SNHJesSh62x0MNkzDh+89b8ZJ7TTncqpcw39VdpoAt5bx2G9b1EM8Jk5XnScjWGpWEHcn0Yr3u4wfYn5xGPSZUTtH3LDwAnLyyn9BazLZuLKPeNLVcDXH+7xc5PtRxxzGXE4i+wfWMNTjy0xb7W1db4ak/p/dXqXrtCJpCMnpwM= 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=mi7xV7Sd; 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-1edf506b216so22082845ad.2 for ; Fri, 17 May 2024 14:37:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1715981864; x=1716586664; 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=VOCpqzi3HqgLjpNBxA0mBkV791uaa9LyaeXWVqamirw=; b=mi7xV7SdU0Vbr7A1Nj1ysyC7NOh08wna9siJ7wD/jdJ/XrJUuheQStOR4iw+TEWI2z w09dZCcpa9KZDqwMQJ+wbAWAtzPslBLUL5YuylAeGWCsv+fn6QRJAhd6XUUDIftvvqiN hh2zn9cTSxxNLQ3Jz0UVf7dauHsPa/FzlEMo4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715981864; x=1716586664; 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=VOCpqzi3HqgLjpNBxA0mBkV791uaa9LyaeXWVqamirw=; b=r4CgTdpKOuAdpCvglVIpAOjDpbpn4a+wYyogJrwcOIh2ih5ktdO8S5SzgXi9Dhfuf2 ddgMtvGDwwmviRI5t9XnfET7LUy/hOX9EOUKaeb5M2M3b/gXUyRKienEwYJ+NNx4/rTP 0S1qHqjtB4my3F7iMcq/sPgn2q/43ActyhAHWnDhHbCxgGuGOKqiVxxAGycErUjJ8MXm PH23ZKlsyrGsACC/Hdmf21QUthPS273smEVrmYi07NDl9U6ZeCqmu8ztvCh5UDKWvppf OJXO18LLQ+nFbFiArTksZ1a9AT5z6thTOZQnrrKn/6avpsk4fp6SI5xfn2bk4+V5LHHC lfkw== X-Forwarded-Encrypted: i=1; AJvYcCVoJrYj0tvVlIXUFLHECt5fwmMEpy0UL+vJbKUjSSHxbRrJ7Cq2cYu4Qs10+CvRmE3qQ+pB0hg17lHeQ2eAc03kG3CHpcOCjvkTFtVX X-Gm-Message-State: AOJu0YxOSaI36Zu8nGpY1P56YrRqVG9nPzv5RwB298TJ38HGxINhEQc4 M8FvEwrz4m1ceuHCNDZ+K0ZPZbsXxLh6ytjUC6124K71v2gkR3ybAAC5q9JJcQ== X-Received: by 2002:a05:6a00:1ad0:b0:6e6:9f47:c18c with SMTP id d2e1a72fcca58-6f4e03858b3mr27717561b3a.33.1715981863806; Fri, 17 May 2024 14:37:43 -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.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 May 2024 14:37:43 -0700 (PDT) From: Douglas Anderson To: Neil Armstrong , Jessica Zhang , Sam Ravnborg Cc: Linus Walleij , Dmitry Baryshkov , Douglas Anderson , Cong Yang , Daniel Vetter , David Airlie , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/8] drm/panel: ilitek-ili9882t: Check for errors on the NOP in prepare() Date: Fri, 17 May 2024 14:36:40 -0700 Message-ID: <20240517143643.5.I323476ba9fa8cc7a5adee4c1ec95202785cc5686@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 The mipi_dsi_dcs_nop() function returns an error but we weren't checking it in ili9882t_prepare(). Add a check. This is highly unlikely to matter in practice. If the NOP failed then likely later MIPI commands would fail too. Found by code inspection. Fixes: e2450d32e5fb ("drm/panel: ili9882t: Break out as separate driver") Signed-off-by: Douglas Anderson --- drivers/gpu/drm/panel/panel-ilitek-ili9882t.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9882t.c b/drivers/gpu/drm/panel/panel-ilitek-ili9882t.c index a2ea25bb6624..266a087fe14c 100644 --- a/drivers/gpu/drm/panel/panel-ilitek-ili9882t.c +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9882t.c @@ -478,7 +478,11 @@ static int ili9882t_prepare(struct drm_panel *panel) usleep_range(10000, 11000); // MIPI needs to keep the LP11 state before the lcm_reset pin is pulled high - mipi_dsi_dcs_nop(ili->dsi); + ret = mipi_dsi_dcs_nop(ili->dsi); + if (ret < 0) { + dev_err(&ili->dsi->dev, "Failed to send NOP: %d\n", ret); + goto poweroff; + } usleep_range(1000, 2000); gpiod_set_value(ili->enable_gpio, 1); -- 2.45.0.rc1.225.g2a3ae87e7f-goog