From patchwork Sun Nov 17 02:39:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Reichel X-Patchwork-Id: 11247929 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D849613B2 for ; Sun, 17 Nov 2019 02:41:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B9CD220855 for ; Sun, 17 Nov 2019 02:41:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725978AbfKQClo (ORCPT ); Sat, 16 Nov 2019 21:41:44 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:48982 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725959AbfKQClo (ORCPT ); Sat, 16 Nov 2019 21:41:44 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: sre) with ESMTPSA id DF07F28F73B Received: by earth.universe (Postfix, from userid 1000) id 960CE3C0C7B; Sun, 17 Nov 2019 03:41:39 +0100 (CET) From: Sebastian Reichel To: Sebastian Reichel , Laurent Pinchart , Tomi Valkeinen Cc: Tony Lindgren , Merlijn Wajer , "H. Nikolaus Schaller" , linux-omap@vger.kernel.org, dri-devel@lists.freedesktop.org, kernel@collabora.com, Sebastian Reichel Subject: [RFCv1 03/42] drm/omap: constify write buffers Date: Sun, 17 Nov 2019 03:39:49 +0100 Message-Id: <20191117024028.2233-4-sebastian.reichel@collabora.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191117024028.2233-1-sebastian.reichel@collabora.com> References: <20191117024028.2233-1-sebastian.reichel@collabora.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org The write buffers are not modified, so they can be constant. Signed-off-by: Sebastian Reichel --- drivers/gpu/drm/omapdrm/dss/dsi.c | 24 ++++++++++++------------ drivers/gpu/drm/omapdrm/dss/omapdss.h | 10 +++++----- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c index fa81fbf3442e..bf6131e5fa14 100644 --- a/drivers/gpu/drm/omapdrm/dss/dsi.c +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c @@ -2601,11 +2601,11 @@ static inline void dsi_vc_write_long_payload(struct dsi_data *dsi, int channel, } static int dsi_vc_send_long(struct dsi_data *dsi, int channel, u8 data_type, - u8 *data, u16 len, u8 ecc) + const u8 *data, u16 len, u8 ecc) { /*u32 val; */ int i; - u8 *p; + const u8 *p; int r = 0; u8 b1, b2, b3, b4; @@ -2698,7 +2698,7 @@ static int dsi_vc_send_null(struct dsi_data *dsi, int channel) } static int dsi_vc_write_nosync_common(struct dsi_data *dsi, int channel, - u8 *data, int len, + const u8 *data, int len, enum dss_dsi_content_type type) { int r; @@ -2729,7 +2729,7 @@ static int dsi_vc_write_nosync_common(struct dsi_data *dsi, int channel, } static int dsi_vc_dcs_write_nosync(struct omap_dss_device *dssdev, int channel, - u8 *data, int len) + const u8 *data, int len) { struct dsi_data *dsi = to_dsi_data(dssdev); @@ -2738,7 +2738,7 @@ static int dsi_vc_dcs_write_nosync(struct omap_dss_device *dssdev, int channel, } static int dsi_vc_generic_write_nosync(struct omap_dss_device *dssdev, int channel, - u8 *data, int len) + const u8 *data, int len) { struct dsi_data *dsi = to_dsi_data(dssdev); @@ -2747,7 +2747,7 @@ static int dsi_vc_generic_write_nosync(struct omap_dss_device *dssdev, int chann } static int dsi_vc_write_common(struct omap_dss_device *dssdev, - int channel, u8 *data, int len, + int channel, const u8 *data, int len, enum dss_dsi_content_type type) { struct dsi_data *dsi = to_dsi_data(dssdev); @@ -2776,15 +2776,15 @@ static int dsi_vc_write_common(struct omap_dss_device *dssdev, return r; } -static int dsi_vc_dcs_write(struct omap_dss_device *dssdev, int channel, u8 *data, - int len) +static int dsi_vc_dcs_write(struct omap_dss_device *dssdev, int channel, + const u8 *data, int len) { return dsi_vc_write_common(dssdev, channel, data, len, DSS_DSI_CONTENT_DCS); } -static int dsi_vc_generic_write(struct omap_dss_device *dssdev, int channel, u8 *data, - int len) +static int dsi_vc_generic_write(struct omap_dss_device *dssdev, int channel, + const u8 *data, int len) { return dsi_vc_write_common(dssdev, channel, data, len, DSS_DSI_CONTENT_GENERIC); @@ -2810,7 +2810,7 @@ static int dsi_vc_dcs_send_read_request(struct dsi_data *dsi, int channel, } static int dsi_vc_generic_send_read_request(struct dsi_data *dsi, int channel, - u8 *reqdata, int reqlen) + const u8 *reqdata, int reqlen) { u16 data; u8 data_type; @@ -2983,7 +2983,7 @@ static int dsi_vc_dcs_read(struct omap_dss_device *dssdev, int channel, u8 dcs_c } static int dsi_vc_generic_read(struct omap_dss_device *dssdev, int channel, - u8 *reqdata, int reqlen, u8 *buf, int buflen) + const u8 *reqdata, int reqlen, u8 *buf, int buflen) { struct dsi_data *dsi = to_dsi_data(dssdev); int r; diff --git a/drivers/gpu/drm/omapdrm/dss/omapdss.h b/drivers/gpu/drm/omapdrm/dss/omapdss.h index 6dd08d096eed..ae1a4600dab2 100644 --- a/drivers/gpu/drm/omapdrm/dss/omapdss.h +++ b/drivers/gpu/drm/omapdrm/dss/omapdss.h @@ -315,18 +315,18 @@ struct omapdss_dsi_ops { /* data transfer */ int (*dcs_write)(struct omap_dss_device *dssdev, int channel, - u8 *data, int len); + const u8 *data, int len); int (*dcs_write_nosync)(struct omap_dss_device *dssdev, int channel, - u8 *data, int len); + const u8 *data, int len); int (*dcs_read)(struct omap_dss_device *dssdev, int channel, u8 dcs_cmd, u8 *data, int len); int (*gen_write)(struct omap_dss_device *dssdev, int channel, - u8 *data, int len); + const u8 *data, int len); int (*gen_write_nosync)(struct omap_dss_device *dssdev, int channel, - u8 *data, int len); + const u8 *data, int len); int (*gen_read)(struct omap_dss_device *dssdev, int channel, - u8 *reqdata, int reqlen, + const u8 *reqdata, int reqlen, u8 *data, int len); int (*bta_sync)(struct omap_dss_device *dssdev, int channel);