Message ID | 20180319160513.16384-117-alexander.levin@microsoft.com |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 10.80.152.129 with SMTP id j1csp2994083edb; Mon, 19 Mar 2018 09:12:30 -0700 (PDT) X-Google-Smtp-Source: AG47ELviP686cvSDeiPJWT4ZTreu/K4vQJ7/wQEx0bWSR0Z5bufx59lfF0/QvP2fcpi7wjx1sQdi X-Received: by 10.101.100.9 with SMTP id a9mr9559948pgv.209.1521475949892; Mon, 19 Mar 2018 09:12:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521475949; cv=none; d=google.com; s=arc-20160816; b=gbsKNHB4t/HbgN8vqt2DOVHaZWG91J5HSBJ8znWuzeSCsqMZW80Nl6+nMhrKn8hPBz CaMzbIwLotpaxGPBc7RJp453FRPG7yGHEXG2mB6h4gpncRdCxs3PUB5cZbNJ1SJwnAYK weAtw8ZPb5X4vnhM3a+ldYr4ooC5o3yQqGYaxUw+ADbhk7Pkd+JUAS5JDk78uYRh80h9 NYYFxdvixI6aNBRn9IeZdMCITB8+4FlKPakh5sKxtSfEHPymq9hYFc4uWf35R/clsDWc m7ngVQpKNu3NIj1icTFAz2Gz8ECxj/xI2Qb6CAP2J3236x6UmU12Xj69lVhcyAvfzd6T NQJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=oshU/ZBNAr62zPlQEwfyDSLZNnylp+dmK1mfeVe4FP8=; b=mRcb1pwz9t4j9o5Y9lPGTjEn7VcHVlB6gIIFjqcO8rB/h19e0XdD2AK+21oiijlqCx uBXVqvJbr8TJmmcR98UF1oHXly/01XO/GJnyGgjQtwF2WabUzqaASeGnrFdgQTKw8Svv 8PAV5qpXXqqG4BIf2BUjm4PJ7DDWVuO+TYDh4NGfWBwT6aSOIienbh+jb++bLctXzhEQ KN/dq+4Gnmx1X2RLuFIea5RV20C1MErNi18pFvHNLbvJAwnq1/OkitX+fT9ywazYFye0 031a8z25uonTUSRFTmhSg0LUZqONSGrgLTAMsj+ni2wymfHGHSzWd39wT888LaFk+ltl Kz7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=fSuhcQ6z; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: <linux-kernel-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l8si192466pff.237.2018.03.19.09.12.29; Mon, 19 Mar 2018 09:12:29 -0700 (PDT) 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=@microsoft.com header.s=selector1 header.b=fSuhcQ6z; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966819AbeCSQM0 (ORCPT <rfc822;dan.rue@linaro.org> + 28 others); Mon, 19 Mar 2018 12:12:26 -0400 Received: from mail-by2nam03on0106.outbound.protection.outlook.com ([104.47.42.106]:22396 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S966304AbeCSQKO (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 19 Mar 2018 12:10:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=oshU/ZBNAr62zPlQEwfyDSLZNnylp+dmK1mfeVe4FP8=; b=fSuhcQ6zJlDIqNTW6e1qgU4j0tasfQZNH9rOU3x6acVkEwCUghZnG6CSLuOzyln8tKhdM2USR6OLhH4sw7TsE32qYm0Mvm/OwRoSrLwsFxBzN2cUVnBwcxBJCpVrabJMwajOChq2Zwf3DIQ2JT8iYfhlUE52ql9Ot1tdC5pvqTg= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0919.namprd21.prod.outlook.com (52.132.132.164) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.631.0; Mon, 19 Mar 2018 16:10:02 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::3d9b:79e7:94eb:5d62]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::3d9b:79e7:94eb:5d62%5]) with mapi id 15.20.0631.004; Mon, 19 Mar 2018 16:10:01 +0000 From: Sasha Levin <Alexander.Levin@microsoft.com> To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "stable@vger.kernel.org" <stable@vger.kernel.org> CC: Tomi Valkeinen <tomi.valkeinen@ti.com>, Sasha Levin <Alexander.Levin@microsoft.com> Subject: [PATCH AUTOSEL for 4.4 117/167] drm/omap: fix tiled buffer stride calculations Thread-Topic: [PATCH AUTOSEL for 4.4 117/167] drm/omap: fix tiled buffer stride calculations Thread-Index: AQHTv5xtYxJk6vhfiUmmJtN/42PLRA== Date: Mon, 19 Mar 2018 16:07:48 +0000 Message-ID: <20180319160513.16384-117-alexander.levin@microsoft.com> References: <20180319160513.16384-1-alexander.levin@microsoft.com> In-Reply-To: <20180319160513.16384-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DM5PR2101MB0919; 7:xIQIZBru/+D+Acfqmi/wZXJu6Nr4aUIuM1Ot6oEy07WM1KuuFuYgVMsEosxzXPetabcw2kUNI4b4QO6uO+qAnwx60tms81eaVht9mHMl0T7NUT9pJZbB58s6UO54nU5ix4L6A9QyVhEkBh3kOo8y3c0wjCWSO5hvQnf0mCAM19LB3n2GEsSryp8G6jrYAsZm4/IMa20eWeq4gYNS7xWzLhowHSryp7gea9rUV6OM1zUJagRiKM+cezaOBWkIpzRK; 20:s1rcsVvDY+FnfJy1comBu+nCPMopuCe3TiNH95uhJ1m3L7E2EXKLoVDiB4y9sUBbBJp4KJ/p3WE0/UoAcTOXjAMn2EuUdOcErBCXXnJkm2LsqBuyynqAHwDswLGWc/4TCCAv9OVSRzMk/ZdvyDN1w+Xhzrv9qKypf01XsGrl920= x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 8dd46385-99e8-4bdf-00c3-08d58db3ded3 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020); SRVR:DM5PR2101MB0919; x-ms-traffictypediagnostic: DM5PR2101MB0919: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: <DM5PR2101MB09198E597009D2EC1B92C73EFBD40@DM5PR2101MB0919.namprd21.prod.outlook.com> x-exchange-antispam-report-test: UriScan:(28532068793085)(31051911155226)(89211679590171); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(61425038)(6040522)(2401047)(5005006)(8121501046)(3231221)(944501300)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(61426038)(61427038)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123564045)(20161123558120)(6072148)(201708071742011); SRVR:DM5PR2101MB0919; BCL:0; PCL:0; RULEID:; SRVR:DM5PR2101MB0919; x-forefront-prvs: 06167FAD59 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(346002)(39380400002)(396003)(39860400002)(376002)(366004)(199004)(189003)(66066001)(2906002)(86362001)(10290500003)(105586002)(8676002)(305945005)(110136005)(478600001)(4326008)(7736002)(81166006)(3280700002)(6506007)(97736004)(107886003)(5660300001)(36756003)(8936002)(53936002)(86612001)(14454004)(59450400001)(1076002)(2501003)(6116002)(10090500001)(76176011)(186003)(3846002)(5250100002)(6512007)(99286004)(102836004)(106356001)(72206003)(81156014)(2950100002)(6666003)(54906003)(3660700001)(22452003)(68736007)(6486002)(25786009)(26005)(316002)(2900100001)(6436002)(22906009)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR2101MB0919; H:DM5PR2101MB1032.namprd21.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: b9+p35v00jHgPCS/S1VjfM1KnXfU58AGCTatSKBYZ9CCiTXNlHnBKPpTDkrP055Bd1fZsEWTJIvS7ZDLjvgbMAaQws9p8h3WFi1wT/Q/eCm5RbotnuqJgeIdxk5wAUi0loBkJCae/LyXaJwsntenTWbzkP8uz6fSlhOEapdUzZPodlQUEwLmMv1aXiem5C40EkQ3AWl0nWZf52nKeex3oeQIXm2jAzBv/+YwzICjMoe5FbFx0lMuFFrV3AZa5f6y8P+0znhiR59kZvKqdJ0qZMpLLfAZKUuTLsPmQGLk/4zPXe1NymSEu+VZCsaMFxfTVR1vbCNgastxXjLwEY9Tjw== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8dd46385-99e8-4bdf-00c3-08d58db3ded3 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Mar 2018 16:07:48.9843 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0919 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org |
Series |
None
|
expand
|
diff --git a/drivers/gpu/drm/omapdrm/omap_gem.c b/drivers/gpu/drm/omapdrm/omap_gem.c index 7ed08fdc4c42..393e5335e33b 100644 --- a/drivers/gpu/drm/omapdrm/omap_gem.c +++ b/drivers/gpu/drm/omapdrm/omap_gem.c @@ -158,7 +158,7 @@ static void evict_entry(struct drm_gem_object *obj, size_t size = PAGE_SIZE * n; loff_t off = mmap_offset(obj) + (entry->obj_pgoff << PAGE_SHIFT); - const int m = 1 + ((omap_obj->width << fmt) / PAGE_SIZE); + const int m = DIV_ROUND_UP(omap_obj->width << fmt, PAGE_SIZE); if (m > 1) { int i; @@ -415,7 +415,7 @@ static int fault_2d(struct drm_gem_object *obj, * into account in some of the math, so figure out virtual stride * in pages */ - const int m = 1 + ((omap_obj->width << fmt) / PAGE_SIZE); + const int m = DIV_ROUND_UP(omap_obj->width << fmt, PAGE_SIZE); /* We don't use vmf->pgoff since that has the fake offset: */ pgoff = ((unsigned long)vmf->virtual_address -