From patchwork Thu Nov 5 12:02:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 11884133 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 82583C00A89 for ; Thu, 5 Nov 2020 12:04:32 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 18A25206ED for ; Thu, 5 Nov 2020 12:04:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ti.com header.i=@ti.com header.b="xwSRH1N7" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 18A25206ED Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=ti.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 25582899BB; Thu, 5 Nov 2020 12:04:20 +0000 (UTC) Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) by gabe.freedesktop.org (Postfix) with ESMTPS id CD79989B99 for ; Thu, 5 Nov 2020 12:04:15 +0000 (UTC) Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 0A5C485F056533; Thu, 5 Nov 2020 06:04:08 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1604577848; bh=KuzRFxaZaEeub4lQnHBfyHYmcKOEXBqeB0NTeHEQ2IU=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=xwSRH1N7jjMvXFMOrMtk3Vdj1eLjBP3yUbU36GTU/LJfOD76PJ+ft8bo5Xig52LZW NC6MKKclz8Fb+RlKHBLAU1uESbhDy7rQR/8josZAS6Z4QWi4gZTlDtYiLpjtHHqVnH P8uRajfd5iKrjn8tGE2IrD9GX3O1+uIm7iohuKxY= Received: from DLEE113.ent.ti.com (dlee113.ent.ti.com [157.170.170.24]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 0A5C48ti071774 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 5 Nov 2020 06:04:08 -0600 Received: from DLEE111.ent.ti.com (157.170.170.22) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Thu, 5 Nov 2020 06:04:07 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE111.ent.ti.com (157.170.170.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Thu, 5 Nov 2020 06:04:08 -0600 Received: from deskari.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 0A5C3rf3039111; Thu, 5 Nov 2020 06:04:05 -0600 From: Tomi Valkeinen To: Sebastian Reichel , Laurent Pinchart , Nikhil Devshatwar , , Subject: [PATCH v3 05/56] drm/omap: constify write buffers Date: Thu, 5 Nov 2020 14:02:42 +0200 Message-ID: <20201105120333.947408-6-tomi.valkeinen@ti.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201105120333.947408-1-tomi.valkeinen@ti.com> References: <20201105120333.947408-1-tomi.valkeinen@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tony Lindgren , "H . Nikolaus Schaller" , Tomi Valkeinen , Sekhar Nori , Sebastian Reichel Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Sebastian Reichel The write buffers are not modified, so they can be constant. Signed-off-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart --- 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 86b9d435fb94..22d74d762a10 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 c4bc1f919ab4..8e96ab2f20b6 100644 --- a/drivers/gpu/drm/omapdrm/dss/omapdss.h +++ b/drivers/gpu/drm/omapdrm/dss/omapdss.h @@ -309,18 +309,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);