Received: by 10.223.185.116 with SMTP id b49csp447344wrg; Fri, 23 Feb 2018 01:06:34 -0800 (PST) X-Google-Smtp-Source: AH8x224VlEhhHfYQr2hYZfao+jtpnzLROrwN0zt2ToCNNdEa9Ju//pDW9OD7z/CzHIqNzqz7Kgg0 X-Received: by 2002:a17:902:ba95:: with SMTP id k21-v6mr1083961pls.111.1519376794449; Fri, 23 Feb 2018 01:06:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519376794; cv=none; d=google.com; s=arc-20160816; b=UaXBStRaukaCaqwlD1J8SfACHIjNYNNPaL4gwb+Neolq2JuqQOxb7uWQe9zINP095I 2Y9q4ibLIEKzG2Ch1RLlNB7JB+41QSd8MT3BA9i8iznoOzesqn3Y86uemTc8kbqeRgnT fCxZWZlUEAjlFa0/Rixcvudm8uzB5hbtqJoaWOGbi3rkzuo5Inpr4CDwRdnj6NjdmICj CMeWPrwxx6cBxfRVCHA3LwQ7qEck6tdVC+qmQ3sQzO4CHGsLQZF8Wy8oX8sPoEUn/s+B DkVBueIn9FJcmWin8dSmKM074+5xPLGNsLkgQWt99OKoT0CDqmSBr0ZWjoiN49P4AGtO eIpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=GBYxoMsyYGbP4zqkoKkyio7j6JAVV6EBgIMsfYq+Ckk=; b=JtxY6mfEqouuX84/BPlmuMxPMb9Kyq5cDhOKPXsfUZhm1Oepwxe8nCuuIKNTR03Dxw //y6jk6mcmUWGSfhqHhrSSBpy+DUyyV65zmWkBqAJtI+O4NZnZkntlBK5bTXNhe1EHRX OJWjFwbZcne78S4umJwXXtkkAd5UOGNrm2Wl0rWlmotTbKg/kKESf23ATu46a2k2CYnX MuT0q/y1VXDrDOmo9aRNzUaRUlDN2FLyxvdMRfBWy/MWftm4uWfn1DQXdC0QP3PnUU9t G2mBqneLdme2SduJC0IA3+ybNtaZqBqJ8mJrbazY8UgVwwXseJhNksbz7i+QadkVt+9a OG3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KMZc2iaC; 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 c65si1508724pfa.93.2018.02.23.01.06.18; Fri, 23 Feb 2018 01:06:34 -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=KMZc2iaC; 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 S1751508AbeBWJFS (ORCPT + 99 others); Fri, 23 Feb 2018 04:05:18 -0500 Received: from mail-qk0-f195.google.com ([209.85.220.195]:37751 "EHLO mail-qk0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751276AbeBWJFR (ORCPT ); Fri, 23 Feb 2018 04:05:17 -0500 Received: by mail-qk0-f195.google.com with SMTP id y137so9968725qka.4 for ; Fri, 23 Feb 2018 01:05:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=GBYxoMsyYGbP4zqkoKkyio7j6JAVV6EBgIMsfYq+Ckk=; b=KMZc2iaCLd6bXhtvWba7qx6b4QbRgaSR5U6pz2kwRp5m2Z8tzeYpal0/PelgyyPLlU LU9ig49/QdpB+iPhAce9rdOFlaAA3kkqPpiLJi4HGt7v13H0/xMAonW8VHG9Acg6PaZ0 cUU1mHd2hKLBl++V1a0pPv9dG1uqJu3qBaCWs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=GBYxoMsyYGbP4zqkoKkyio7j6JAVV6EBgIMsfYq+Ckk=; b=QEwSnrBeCVEE3CiTyiXu++Jeaz2xRuvHAelSLSvYZbPdVfT3F8iUJPCnN08CJ1In5s CVnIISIApIwTPTrIRdtfEZ+peRdoHX1jsxZmtrUUnTOpB+SLXbB+1URR2xM0Alzy/WM9 UuQ0QjbQ/oJQMJVEsCwxQL+UQVRzemuOs5vdptaMzSYKnN+PBwjZZOlG6xmzhD7/tO56 Q/ZNAYzQP5UlcD7OXMC+QdCFFKyqppYfT26RvX8taDxPICqjCb6ZGPMV2XcskU5np4CX za+0VIbfOFaY+pZoVoNvWW5aOKgfdq7pV/M5c6PpLr0ryEmg+r6oJ/XJPMGrQ3QdYJr0 9xqQ== X-Gm-Message-State: APf1xPCE1oljLBdfXVUYzejtIx8asi6WeTO8BLaT0Uy+I4RwTtFDiXnG d0X5SX8nqyaJlAjSwfNmv8AexDRTlN+pTKf/IoUEOw== X-Received: by 10.55.79.78 with SMTP id d75mr1378798qkb.20.1519376716299; Fri, 23 Feb 2018 01:05:16 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.104.13 with HTTP; Fri, 23 Feb 2018 01:05:15 -0800 (PST) In-Reply-To: References: <20180131080508.14356-1-benjamin.gaignard@linaro.org> From: Benjamin Gaignard Date: Fri, 23 Feb 2018 10:05:15 +0100 Message-ID: Subject: Re: [PATCH v2] drm/stm: check pitch and size calculations even if !CONFIG_MMU To: Philippe CORNU Cc: Yannick FERTRE , Vincent ABRIOU , "laurent.pinchart@ideasonboard.com" , "airlied@linux.ie" , "dri-devel@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2018-02-23 9:33 GMT+01:00 Philippe CORNU : > Hi Benjamin, > > On 01/31/2018 09:05 AM, Benjamin Gaignard wrote: >> 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 > > Reviewed-by: Philippe Cornu Applied on drm-misc-next. Regards, Benjamin > > Many thanks, > Philippe :-) > >> >> return drm_gem_cma_dumb_create_internal(file, dev, args); >> } >>