From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2090AC433E1 for ; Mon, 22 Mar 2021 14:48:50 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9FE966192B for ; Mon, 22 Mar 2021 14:48:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9FE966192B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 05EFE6E4B7; Mon, 22 Mar 2021 14:48:49 +0000 (UTC) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6D3C26E4B7 for ; Mon, 22 Mar 2021 14:48:47 +0000 (UTC) IronPort-SDR: ayMPlCT5cgtA4uMSe4RrwTrklydzC5KCm2ubT0+1ehnzCVVCCZFxsWLVWZ5D0kLr8TPerB9rdy RJqHbZQlntIA== X-IronPort-AV: E=McAfee;i="6000,8403,9931"; a="187962520" X-IronPort-AV: E=Sophos;i="5.81,269,1610438400"; d="scan'208";a="187962520" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Mar 2021 07:48:47 -0700 IronPort-SDR: zDmcqWFFYfj8KZGBAQBkDn4BpSFjvWrE7qAvurk3Z1es1rDMVWKtUzaayMDU8ob81ydPBTzvbh hxJ6DVIFKEPA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,269,1610438400"; d="scan'208";a="381007226" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.171]) by fmsmga007.fm.intel.com with SMTP; 22 Mar 2021 07:48:45 -0700 Received: by stinkbox (sSMTP sendmail emulation); Mon, 22 Mar 2021 16:48:44 +0200 Date: Mon, 22 Mar 2021 16:48:44 +0200 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: Chris Wilson Message-ID: References: <20210321161038.9329-1-ville.syrjala@linux.intel.com> <161634408760.31629.1053248022479151885@build.alporthouse.com> <161634423285.31629.4117583325553566238@build.alporthouse.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <161634423285.31629.4117583325553566238@build.alporthouse.com> X-Patchwork-Hint: comment Subject: Re: [Intel-gfx] [PATCH] drm/i915: Avoid div-by-zero on gen2 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: intel-gfx@lists.freedesktop.org Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Sun, Mar 21, 2021 at 04:30:32PM +0000, Chris Wilson wrote: > Quoting Chris Wilson (2021-03-21 16:28:07) > > Quoting Ville Syrjala (2021-03-21 16:10:38) > > > diff --git a/drivers/gpu/drm/i915/gem/i915_gem_mman.c b/drivers/gpu/d= rm/i915/gem/i915_gem_mman.c > > > index ec28a6cde49b..0b2434e29d00 100644 > > > --- a/drivers/gpu/drm/i915/gem/i915_gem_mman.c > > > +++ b/drivers/gpu/drm/i915/gem/i915_gem_mman.c > > > @@ -189,7 +189,7 @@ compute_partial_view(const struct drm_i915_gem_ob= ject *obj, > > > struct i915_ggtt_view view; > > > = > > > if (i915_gem_object_is_tiled(obj)) > > > - chunk =3D roundup(chunk, tile_row_pages(obj)); > > > + chunk =3D roundup(chunk, tile_row_pages(obj) ?: 1); > > = > > I was thinking the answer would be to align to the next page, and hey > > presto! > = > Wait, the tile row cannot be a single page. Something else is zero that > should not be. How come? At least i915_tiling_ok() doesn't enforce any bigger lower bound. -- = Ville Syrj=E4l=E4 Intel _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx