Message ID | 20180319161117.17833-66-alexander.levin@microsoft.com |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 10.80.152.129 with SMTP id j1csp2995523edb; Mon, 19 Mar 2018 09:13:44 -0700 (PDT) X-Google-Smtp-Source: AG47ELuWDnqTUPzq9O4m+riu75+IQdgjPzAgb14bQuNc4bxkJP9hhaGcmIQZaw7ccsIxeirE9gp3 X-Received: by 10.99.120.138 with SMTP id t132mr9615927pgc.280.1521476024084; Mon, 19 Mar 2018 09:13:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521476024; cv=none; d=google.com; s=arc-20160816; b=Ef4xrDCLfXRDI+Y1UvJ1Ajd+wnM+u5+kz6YQfHXYAa4U9h9OISyhlA7qd2aazt0SIS RydOoXQsthp/OY3datbuSuwqZXq1JPpm3IxCPEtVCyanrXeWSKXE+yXL2uJWxKMa+LUE Nv8wESFQAruHOuij5HJRehQ1jZEBCQM4OA9nr/qMB6FyoSCXcW8IC5KZYep7hv8JQQ42 EXtxU+8+ZXruuPYtixti+SE148spoYUtjqJFbS7425Gb6qSQQxZ4VgDaEMOl560IsMvZ /2bWxtc4KRfvKlESuCgERhx/UUbbbvI0PQYSML77t/hC/mMzSuhG8FlP55HAp8ybWqhP Ad6w== 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=ASYjTstmuLIq0rgKF1UM99cmIE+BmE43jzrCpMharcA=; b=QwA3RhBYCU1hsHQuNVr9vsnqalT0uXF0CP8f8RSDmzO8dTWvoT7jx8fWV5SoxVDaey lp52VFwWWAU/V9w99QYdxXhapUaWYO4zuUlLBR+WPu+cxD9Q+7NDORJx6UntkuUalY4L SBjNeYeOF0jfxZBVw57uqOwNL//BXDhudtjLLfQQZz5tD5Qk9Eju6IqIHgRFHHPvi9jo x0wPg11YyFmqQnLD+JqU5/23CKm4NOlmvMwLcLLoujnEVEKCUMGpqoyno9+mSpI5b8PN UNRV0RxaG+4BjFRUVylLd5mlnK9QusdNnR5ewrp+5yxoSX6BgcMAZBP/Id48KNeOaMw5 2ZAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=Kwu15wAj; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: <stable-owner@vger.kernel.org> Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e67si201465pfa.140.2018.03.19.09.13.43; Mon, 19 Mar 2018 09:13:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-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=Kwu15wAj; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 S935312AbeCSQNj (ORCPT <rfc822;anders.roxell@linaro.org> + 10 others); Mon, 19 Mar 2018 12:13:39 -0400 Received: from mail-cys01nam02on0094.outbound.protection.outlook.com ([104.47.37.94]:64207 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S935246AbeCSQNe (ORCPT <rfc822;stable@vger.kernel.org>); Mon, 19 Mar 2018 12:13:34 -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=ASYjTstmuLIq0rgKF1UM99cmIE+BmE43jzrCpMharcA=; b=Kwu15wAj3skaqJP+HXkPvyrqH0rGUhjqS7PcbTAoIUYAV3nd/qV9jU4TFlkYmX8eijuN6tlCjA89dPJfUurbMKS5ijOW+1ZO5WopBDYz139JOll6Hj8jlDyqZvPYnkhi2I+6qhZqK2JoL4k/0/p3/zY2hzl5htyQy6lZ3KQJEH0= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB1048.namprd21.prod.outlook.com (52.132.128.17) 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:13:19 +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:13:19 +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 3.18 066/102] drm/omap: fix tiled buffer stride calculations Thread-Topic: [PATCH AUTOSEL for 3.18 066/102] drm/omap: fix tiled buffer stride calculations Thread-Index: AQHTv50hZoTbnkI1eEKp2EqQbCoWPQ== Date: Mon, 19 Mar 2018 16:12:51 +0000 Message-ID: <20180319161117.17833-66-alexander.levin@microsoft.com> References: <20180319161117.17833-1-alexander.levin@microsoft.com> In-Reply-To: <20180319161117.17833-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; DM5PR2101MB1048; 7:7Y9j5B90+oOE+aLsJ3ImYI5SCs4YdQfQHcrfVsPA9IZHvxnUuwiCQRiiMLkzEW1CVvhyq9Jrp14pN7mCR/0zQKvbwQTHb5uy0TudFT5Exst8eIsxn3+EkYFPIFx4HioaYapixHdhUrCEVya3RVGB3JVsWfAqZJL51xr75m42nJI61U1X19VwvuKyThHPwHkJvjGmSZ7ZS9+bl/QKwIC4Yg2UEdyc0UqKnUhnWDOod19lvBFHRxfb5htcGfY8kxM4; 20:y3GKgeL1JdxzDQ8br57/UvBlyWBVTta/8akgFxwoRhJT5Jf9IWue+pk5xHvCGOo1UKOpq90o6F8eWW81wDkMSb6et42FNuqqSXX0d3VzUR4xPt6oajsgfmcjriRzZHwqfsgZhylF6A28D5iIWq9m2dN9FfEl4BfUBeK/5fso6z8= x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 2adc8d89-c7be-474a-fdf7-08d58db454c5 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020); SRVR:DM5PR2101MB1048; x-ms-traffictypediagnostic: DM5PR2101MB1048: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: <DM5PR2101MB1048AC012778CB6D5001E9F5FBD40@DM5PR2101MB1048.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:DM5PR2101MB1048; BCL:0; PCL:0; RULEID:; SRVR:DM5PR2101MB1048; x-forefront-prvs: 06167FAD59 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39380400002)(396003)(346002)(39860400002)(366004)(376002)(189003)(199004)(10090500001)(107886003)(25786009)(106356001)(102836004)(26005)(6506007)(8936002)(2906002)(6666003)(186003)(86362001)(2950100002)(5250100002)(66066001)(3280700002)(5660300001)(4326008)(72206003)(68736007)(10290500003)(86612001)(2501003)(478600001)(81156014)(81166006)(8676002)(2900100001)(1076002)(105586002)(6436002)(54906003)(110136005)(53936002)(36756003)(6116002)(59450400001)(3846002)(305945005)(316002)(6512007)(6486002)(14454004)(97736004)(3660700001)(7736002)(76176011)(22452003)(99286004)(22906009)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR2101MB1048; H:DM5PR2101MB1032.namprd21.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: IFwvanqKttitSXvqxjVPYnBGmWjMtUuGzT7n/U98Bq3yGdHj0PkMCf5CUWhn9OpOL52DNVKCsl3SLWHrA4cfLASfKRnTiTOVtgDLXyrNJbLeMLaLF2iyu8yRrvfJqdOWibUdy2s0Y0Tl0baYGUbGPfibGtOyn2Ss3xcPzNUtXV8OGGuIoPAZ3iusbUExa+Jx2OUH7beh26KbYxapai5yvgGwstKpWRgdgEUHYzuLijRzwn0e0OetdoiuyXrWCs/+5FTlot9fAB54bfzHT2EVI83hONp/7PFFz+gVN71qaTWrWo9X7qCNfW2vwYCgMu0cfsewFMSmUwtWLczcxCe1OQ== 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: 2adc8d89-c7be-474a-fdf7-08d58db454c5 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Mar 2018 16:12:51.4564 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB1048 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: <stable.vger.kernel.org> X-Mailing-List: stable@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 e4849413ee80..4f745c11d955 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 -