From patchwork Thu Sep 30 03:05:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 514869 Delivered-To: patch@linaro.org Received: by 2002:a05:6638:4087:0:0:0:0 with SMTP id m7csp648485jam; Wed, 29 Sep 2021 20:06:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzsrKw4TpnVmDweXpyN/D+YqCrO0PKhq9AeEvi0rO6kXH2w0X2Afc7sdYN7ILUO0GtiWUVa X-Received: by 2002:aa7:c941:: with SMTP id h1mr4392567edt.128.1632971162891; Wed, 29 Sep 2021 20:06:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632971162; cv=none; d=google.com; s=arc-20160816; b=ViKoMM5RZYszeFCQQr1pgZ/anrQdz0HfFXwvJ38iJwbzO0cbAeLFJudIPdQTSFxCdO AX22suDp6+zcWHMwqaZrNtt0Mx2vGGpsiqIvHg6cY1zPN0WdSWI6OTK3SCyzUhY6DGr2 I3VUx6MgYzvwUb/crN3XBvcyv45HxctqKe5fuv6+E+XsbJM+1hp6WtrlrDvQi0LBilx4 sP7YcRDnxG/ZXZliRz3sRTGQ7i2uiu7PQ20+tolh+CRx+rLyDrGUfAp37Y8S/hImIOQ+ bArt8yyXETTXDkfRnb0B5QvqFVEwTDNpTUKHAwqdtfymkDvgQeDBgQbf9P9yEG6hS0A1 aZKw== 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=sDTL0yxYT47N+0jjLEyGdD4ZajCQhNx8OZO23Bvom6A=; b=lkSSe0CvLxTV8sGubhAUQyewjpYuzvfVw2ih7d2/jTvPuy9sP/S1+W5Q1Ujvd1NzsW I7B+2ubSJf3stqR941iv4QMM/DH4fKy/sgqQn+uRXIT1oHVFiPvFI/WcjDith2YVut9V 6D8X73XcD7kCB1e3Q7lyRxxnU6NftnP2vWfsxxqsVCoMhO1mx+p7aiv7aZXoeAqpByal 5AeXBRofS+C0XY8qTx5izachbt8O7G01dI+fbZTFeFDl4cABwgKVbC2PsJtb0bcLqGCM /CNNJR+pVIz1kyz6I9DEN/YkmQYZCB3fEVL115sphg+ChYhnEmO+pxtjGWCumbRYCrIT TrIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JmtbCmQr; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 5si2146628ejm.251.2021.09.29.20.06.02; Wed, 29 Sep 2021 20:06:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JmtbCmQr; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347930AbhI3DHn (ORCPT + 17 others); Wed, 29 Sep 2021 23:07:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347719AbhI3DHm (ORCPT ); Wed, 29 Sep 2021 23:07:42 -0400 Received: from mail-oi1-x233.google.com (mail-oi1-x233.google.com [IPv6:2607:f8b0:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58081C06176A for ; Wed, 29 Sep 2021 20:06:00 -0700 (PDT) Received: by mail-oi1-x233.google.com with SMTP id y201so5554345oie.3 for ; Wed, 29 Sep 2021 20:06:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=sDTL0yxYT47N+0jjLEyGdD4ZajCQhNx8OZO23Bvom6A=; b=JmtbCmQrhYNDXZGRKfkIH0HRRStQuRwld6nSinEj6CMvOBT4R7SgwLdKRm7MQ+s5hk BHJ95SI6qznWSrrLE1GzHC4e7e0ElMKW+mFYfeg9+lqVuTTL9px+5xg+Je2MfUKFe+rO hUUcAJp6z370gj87PvvaOgH1Sii++lIJX60jgIUbq4PWXabEz7/XWF2H1eCKnojX4gdi KbWjuN0EJ60lQ+k5Cd7A8pR4F1fL9Ogu6x7MNC6htOvwrWwyZ4G6XDZPOsib/Wb1o+XA zo3xDDQIPPOyYITYmiqW8yi3U6JIv4FpdStnk3n8v7g87QRSymRD21DIhyvuMcK6ghPN C43Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=sDTL0yxYT47N+0jjLEyGdD4ZajCQhNx8OZO23Bvom6A=; b=d3MHPUn42NjOIC3VJHtGX04+GN7gU3jFtZzArQMzvH6ozfRsRVGr1iIHguVnWOfTur UqOz4mS7eXzo9qmEJkzL5L6rpzJg8qbBV/z4dlsj6oKvqwwE0QDdbuOWFozPNrwrUM8E OJhnFBonykf4E+7gpNiBOJodXIkSGExHIokijPxM4riiIeDW5RGgA3bYhw7QLiSz9CC2 uqQoepHq6yCprLjEGkSNkoQ09Nr0gUpDWVxrjVgBqXhItWBl1gBIpPizTzdqHJa3Cj4A tNMBDUjR6nPBYAtp8udMUliLuE0/Taqb0S9zX+vmZBKpBkeghHO4FvTsR5l7HIgFQT42 8U3A== X-Gm-Message-State: AOAM533UQUyPk3xRjzSmC2+rP6942114oB+hnb3eCCRpXIH+9vzCbdV8 pyOSoC5Rvok9OrUJ5/3vZYAicA== X-Received: by 2002:a54:4f1d:: with SMTP id e29mr880677oiy.179.1632971159696; Wed, 29 Sep 2021 20:05:59 -0700 (PDT) Received: from builder.lan (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id s16sm323358otq.78.2021.09.29.20.05.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Sep 2021 20:05:59 -0700 (PDT) From: Bjorn Andersson To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , Thierry Reding , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Lee Jones Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org, linux-arm-msm@vger.kernel.org, Doug Anderson Subject: [PATCH v6 2/3] drm/bridge: ti-sn65dsi86: Use regmap_bulk_write API Date: Wed, 29 Sep 2021 22:05:56 -0500 Message-Id: <20210930030557.1426-2-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210930030557.1426-1-bjorn.andersson@linaro.org> References: <20210930030557.1426-1-bjorn.andersson@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The multi-register u16 write operation can use regmap_bulk_write() instead of two separate regmap_write() calls. It's uncertain if this has any effect on the actual updates of the underlying registers, but this at least gives the hardware the opportunity and saves us one transation on the bus. Signed-off-by: Bjorn Andersson Reviewed-by: Douglas Anderson --- Changes since v5: - Extracted this hunk from patch 3. drivers/gpu/drm/bridge/ti-sn65dsi86.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.32.0 diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c index 41d48a393e7f..412fb6f564ea 100644 --- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c +++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c @@ -193,8 +193,9 @@ static const struct regmap_config ti_sn65dsi86_regmap_config = { static void ti_sn65dsi86_write_u16(struct ti_sn65dsi86 *pdata, unsigned int reg, u16 val) { - regmap_write(pdata->regmap, reg, val & 0xFF); - regmap_write(pdata->regmap, reg + 1, val >> 8); + u8 buf[2] = { val & 0xff, val >> 8 }; + + regmap_bulk_write(pdata->regmap, reg, buf, ARRAY_SIZE(buf)); } static u32 ti_sn_bridge_get_dsi_freq(struct ti_sn65dsi86 *pdata)