Message ID | 20231024155739.3861342-2-andriy.shevchenko@linux.intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce89:0:b0:403:3b70:6f57 with SMTP id p9csp2040152vqx; Tue, 24 Oct 2023 08:58:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IExbntoteQBSK0U61C7qRra/AdFcV7ke+BhetMXDPzfYvOJLR6SeluxS2RBpyRQuzr6oG5i X-Received: by 2002:a05:6a20:7fa4:b0:163:4288:1c3d with SMTP id d36-20020a056a207fa400b0016342881c3dmr3693631pzj.43.1698163087591; Tue, 24 Oct 2023 08:58:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698163087; cv=none; d=google.com; s=arc-20160816; b=CQDcDhdTX0pEydx5WchKqOMrz5GiGXkEOoNsXh87l0MV32Ce9s/dK/y5SGbzXPrurX mbosxUBHFi8pH/NcxagBnoin2JssKiT7lhIJ0MlYMN8mK9uIT1n7mOeG53p6ojmxueTf vZXlTKz/aIoy650/pZ5BhRDkvfVeg8SgPGH6OZXvck7jN92BNlQfKM1s2fxsGuuEA7gC OUvtfL+eg/sHb6WVIWUSJnp9FZcpjHOvGN4SSYYXplClfUSJ71WxRnt175XhXFM9cRKa 4IxWbqm6sYlVfQpps56NH2tjVht4oq6rFLcrdvRAbZj+Dumvl1E7uZC3pPmhFGXa1oZM PH+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ogVNf2vN8N9TldGw85tx3gLlqzAdiMpuH9ogLE1RWTA=; fh=4fCGr/vcT8BP5WO1Zwkta5BK+bnwH5aUY2dV04P1PeQ=; b=nSHIefVWEyzlz7bigAktpwsRWt1y7aoK209vuyRFnLDDdU2stNntcgh8bQv/XdT9AA OSObmWdZEKYufpLQSnVK/gDeeoMeXcHwfd2x8iwNKPkShKiovgCqv0X+Kphyi9flx7u5 TYcqjncJA3tehbZvr2anexN8ysFV1r3KvItHzKkKqw27rAJJ7EI0dLWpetM1Mqleg0hE /wnMMVi0eakdWS8hcdGTRkW6/JK93oPMbxyFnG4Ed+78QIX8xu4EMosb6R7YJE+FNfcV EQrYwRaBqDF3BkBez3PL29FxZ1zpCv+mt9PYOVaDwrk2CRFoyea1z1EkKfICeXgCyoZW /KJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=XufQ+EyH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id j193-20020a638bca000000b005b8edc44692si1177616pge.721.2023.10.24.08.58.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Oct 2023 08:58:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=XufQ+EyH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 4866A802642D; Tue, 24 Oct 2023 08:58:03 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343979AbjJXP5w (ORCPT <rfc822;aposhian.dev@gmail.com> + 27 others); Tue, 24 Oct 2023 11:57:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234794AbjJXP5t (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 24 Oct 2023 11:57:49 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFCD783 for <linux-kernel@vger.kernel.org>; Tue, 24 Oct 2023 08:57:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1698163068; x=1729699068; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=CGHK9hVViLLRXP1qkBxDzBZsDUdNwG2+XztuBNrzymU=; b=XufQ+EyHCJ7RTzgQxDCFm8rp/LMFZfQNhns4p5pRPMloydw0Wfpuukz5 VnYTKtI2TWA7nrLRgl6Laghp4q1EaYeKnaU/k7HtRw6LKGoZ5bUlL2dZU 6bP2Cd0uuc4YD/MjJe/bBx0TmJNa2/iv6qngPSLXmJXUTVw/J9sjug9/A PM0KrswE0jtF4WI1EKuv3uwp8MC9m36BsrG9pZGHMqjJpqJeA9UmSGCYV yFaTTQBVI1+lTu57NenzPy33MnhxZmlQp7au+O5apwNTAX/gQzDwljmT6 1Jd2ErXdZ0wnaeC8MTqXe+xRYIqTKHGyuW3PLHYOyUQN00i+k7p5QZJdS g==; X-IronPort-AV: E=McAfee;i="6600,9927,10873"; a="8649780" X-IronPort-AV: E=Sophos;i="6.03,248,1694761200"; d="scan'208";a="8649780" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Oct 2023 08:57:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10873"; a="902233850" X-IronPort-AV: E=Sophos;i="6.03,248,1694761200"; d="scan'208";a="902233850" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 24 Oct 2023 08:55:22 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 094E814F; Tue, 24 Oct 2023 18:57:41 +0300 (EEST) From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>, Jani Nikula <jani.nikula@intel.com>, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: Jani Nikula <jani.nikula@linux.intel.com>, Joonas Lahtinen <joonas.lahtinen@linux.intel.com>, Rodrigo Vivi <rodrigo.vivi@intel.com>, Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>, David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>, Hans de Goede <hdegoede@redhat.com> Subject: [PATCH v2 1/7] drm/i915/dsi: Replace while(1) with one with clear exit condition Date: Tue, 24 Oct 2023 18:57:33 +0300 Message-Id: <20231024155739.3861342-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.40.0.1.gaa8946217a0b In-Reply-To: <20231024155739.3861342-1-andriy.shevchenko@linux.intel.com> References: <20231024155739.3861342-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Tue, 24 Oct 2023 08:58:03 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780653057929313601 X-GMAIL-MSGID: 1780653057929313601 |
Series |
drm/i915/dsi: 2nd attempt to get rid of IOSF GPIO
|
|
Commit Message
Andy Shevchenko
Oct. 24, 2023, 3:57 p.m. UTC
Move existing condition to while(), so it will be clear on what
circumstances the loop is successfully finishing.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/gpu/drm/i915/display/intel_dsi_vbt.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
Comments
Hi Andy, On Tue, Oct 24, 2023 at 06:57:33PM +0300, Andy Shevchenko wrote: > Move existing condition to while(), so it will be clear on what > circumstances the loop is successfully finishing. > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Andi
diff --git a/drivers/gpu/drm/i915/display/intel_dsi_vbt.c b/drivers/gpu/drm/i915/display/intel_dsi_vbt.c index 24b2cbcfc1ef..a6a6f1814967 100644 --- a/drivers/gpu/drm/i915/display/intel_dsi_vbt.c +++ b/drivers/gpu/drm/i915/display/intel_dsi_vbt.c @@ -707,13 +707,10 @@ static void intel_dsi_vbt_exec(struct intel_dsi *intel_dsi, if (connector->panel.vbt.dsi.seq_version >= 3) data += 4; - while (1) { + while (*data != MIPI_SEQ_ELEM_END) { u8 operation_byte = *data++; u8 operation_size = 0; - if (operation_byte == MIPI_SEQ_ELEM_END) - break; - if (operation_byte < ARRAY_SIZE(exec_elem)) mipi_elem_exec = exec_elem[operation_byte]; else