Received: by 10.223.176.5 with SMTP id f5csp1076767wra; Wed, 31 Jan 2018 00:41:24 -0800 (PST) X-Google-Smtp-Source: AH8x225bihod5ZHoDkmk6d3O6kB/dI3ey2gJx/jIAgZkIxyRLkItJbZFr1rqZWDvd5isD1em9SxE X-Received: by 10.101.65.71 with SMTP id x7mr25781536pgp.379.1517388083982; Wed, 31 Jan 2018 00:41:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517388083; cv=none; d=google.com; s=arc-20160816; b=LcECp7gB3pQjpG/RBFSxtOqkHYT5CH9L5/86BVjYZLzkQDo9ehdwuI1q2hwPBGqz5q JRmsXNNbJX03rUEu+Y+CSs4W5k1JgGqG3UWuvRibxVtNJrPdGjdMTK4ppEi+Zgw0zxpK pd394ecDqHH74pF3D895LuT4HTRr+/2OQWGCESlOp8I/Y6o75rQNLeqyLACWQ5xSNyp2 xp55/rrhXiG3hWr81xZfhK7/FckA2TL2vDKqBhWr2Evquqf9Vp3hVifibuKF/1OC45KL 8Gtr8NU9eYhAc+xuQp4o03JEt5mXmjo3tXf/oLax23dHczHEp5vIFBj4NSN3vPMOkuok gb7w== 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 l9si4237269pfi.159.2018.01.31.00.41.09; Wed, 31 Jan 2018 00:41:23 -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 S1752717AbeAaIFX (ORCPT + 99 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(-) 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); } -- 2.15.0