From patchwork Wed Jan 31 08:05:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 126320 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp489635ljc; Wed, 31 Jan 2018 00:05:25 -0800 (PST) X-Google-Smtp-Source: AH8x226ANSr717cdFwmKJpUMEkDJwdzEc/Sb3U9zsDuqc4eVRtDGegmTLflaSbHaICAwHAcizpJq X-Received: by 2002:a17:902:121:: with SMTP id 30-v6mr26860415plb.288.1517385925717; Wed, 31 Jan 2018 00:05:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517385925; cv=none; d=google.com; s=arc-20160816; b=McWUr3R6vXFLF1X+S6LoFc5kz2TeNxzwkmVlnC0ftRquBCLEToA+gfZgYciaUnfg3h +RuqQNQvz+ivezg/CyGFMlrDijl3RILotrZdf/H8L/lTwmdI1VPn/47k/nhQMrPkRoUr nH5OXoubbQIRreNxgdO2WZ/8dRCAl1s3tiPiDdSw7G2ta9TC00j1p3U409tX6sp3Hybk 5Zt+Yxsz1XLGfd0kiNXt2QFA2Clj3qY2iL9V7Yo5iz38fAWxxa08HKvYTVUqax/EXq2L OilKXSiFmld3T7sJNAz+bo8ztKU4AMCkvBXx2fS27mCBNcO4Rdbekjiujn6cEeZrPk5X X4eA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=pqSRtUgfC1uHaTyK3It+y14rgo2q1G8HFJLWRlp4LOM=; b=MCsCEIKB3yS1KLaBqteWQ0b6KeMmp6ZE/DnV4tQCuVeobKyvGMlwaqFWpxu+q2jU9R GDXuxLnFWJb4BR5Bnc/hom1o/+JUYEVEFG+rmshNOw9cH8UpbqwtHYsFVm8Qd+Sdm27+ 9W7WRGFCHaCujAWGEUO36k1pmTiGwIFdb4LUDKdD2t20kho/X2eFaNh4E4myfUQJdGA2 aXPaOTETV2i+YOg3W/PVXQOPApERVxkoZIvHg6Jfl8ErHdTqIRVrRFCnFnWhSIj1s84X 9EpQAdlF3lOHMYGeCVpMWB1e+uf7IPxNQPZV+c0Mm2aF37AM3nttAHYpm9q+op+CHxF0 LSoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ho/QgHhm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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. [209.132.180.67]) by mx.google.com with ESMTP id j6si1605400pfg.44.2018.01.31.00.05.25; Wed, 31 Jan 2018 00:05:25 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ho/QgHhm; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1752768AbeAaIFX (ORCPT + 28 others); Wed, 31 Jan 2018 03:05:23 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:52566 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752579AbeAaIFV (ORCPT ); Wed, 31 Jan 2018 03:05:21 -0500 Received: by mail-wm0-f68.google.com with SMTP id g1so6148398wmg.2 for ; Wed, 31 Jan 2018 00:05:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=pqSRtUgfC1uHaTyK3It+y14rgo2q1G8HFJLWRlp4LOM=; b=ho/QgHhmjLNTTpFpcuzelf3o9jvLrl90pxVMlr/7fdGWcN4Uv7spz6FbTOoNu1JkSq fR4WNwD5ihjVZtnJNr+XylZk+nf0VZfLqOyA9YSCdczprFDoKIdfqH3umq7nUBYhciJS /woVVLfb+csi97Lg73kwRa6ELUkCF9KKM6gkY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=pqSRtUgfC1uHaTyK3It+y14rgo2q1G8HFJLWRlp4LOM=; b=RCDwiFqz3rUXD3XeSstBTqKmupbFSv71QyKrcvozWjHztPOnWL1AM3vWbHkCI8sxsN QBDVSxrlYKHK2JN/pqMLP095uuLDsAnyhWuTNKQDjr6UAOTUrlBvM0ufPP+ENDHYk1BI 03u0e5ZETW9mtXBXEx914ATk3bLAVqGhcc/hSP+zk9z/q0QA4yotHfEIt1by4QS0W6j0 dLdp2yC+NDN5Fu/NpI0hLmpdFd7M/pH5Gr6eJHP9kuUuTZ7WXhZxFy6gfvz9Jqu6fMCj 8vuGDi/mL8acZSza/OWKVOQScAxJ6pSp4w3dMDtNYLr2BB1AnNIf76Z43cYEllwX0QKf nJMg== X-Gm-Message-State: AKwxytfReUUv+DLFKchrdmO3CDQM4fsVBw1F0/Kmm8zXlCOMOFGYfUk2 nadgK38MithLfOF937fUq0CvUA== X-Received: by 10.28.126.133 with SMTP id z127mr24698374wmc.64.1517385920741; Wed, 31 Jan 2018 00:05:20 -0800 (PST) Received: from lmecxl0911.lme.st.com ([80.215.95.238]) by smtp.gmail.com with ESMTPSA id k125sm36583177wmd.48.2018.01.31.00.05.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 31 Jan 2018 00:05:19 -0800 (PST) From: Benjamin Gaignard To: yannick.fertre@st.com, philippe.cornu@st.com, vincent.abriou@st.com, laurent.pinchart@ideasonboard.com Cc: airlied@linux.ie, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Benjamin Gaignard Subject: [PATCH v2] drm/stm: check pitch and size calculations even if !CONFIG_MMU Date: Wed, 31 Jan 2018 09:05:08 +0100 Message-Id: <20180131080508.14356-1-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 2.15.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In all cases we have to check pitch and size calculations to speed up data transfer. Fixes: 21f815bf773c ("drm/stm: drv: Improve data transfers") Signed-off-by: Benjamin Gaignard --- drivers/gpu/drm/stm/drv.c | 2 -- 1 file changed, 2 deletions(-) -- 2.15.0 Tested-by: Philippe Cornu Reviewed-by: Philippe Cornu diff --git a/drivers/gpu/drm/stm/drv.c b/drivers/gpu/drm/stm/drv.c index 8bc7e8418b8d..9ab00a87f7cc 100644 --- a/drivers/gpu/drm/stm/drv.c +++ b/drivers/gpu/drm/stm/drv.c @@ -35,7 +35,6 @@ static int stm_gem_cma_dumb_create(struct drm_file *file, struct drm_device *dev, struct drm_mode_create_dumb *args) { -#ifdef CONFIG_MMU unsigned int min_pitch = DIV_ROUND_UP(args->width * args->bpp, 8); /* @@ -44,7 +43,6 @@ static int stm_gem_cma_dumb_create(struct drm_file *file, */ args->pitch = roundup(min_pitch, 128); args->height = roundup(args->height, 4); -#endif return drm_gem_cma_dumb_create_internal(file, dev, args); }