Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp643247pxu; Fri, 23 Oct 2020 09:38:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz2QqI+VJA8wJLkauqTOZ5pSqQPdU24WaE6lBqoMsZ6GI3k7MGR1mQIzBmXxo3Y1I3fLUzt X-Received: by 2002:a05:6402:36d:: with SMTP id s13mr3066448edw.203.1603471127835; Fri, 23 Oct 2020 09:38:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603471127; cv=none; d=google.com; s=arc-20160816; b=CGWc6UaaivsURRanjivSLybfcfpBT/sox//FlB/o4+dbcghkfoLIc8a0YbHApKa8GK zdCOermYSuUJBvIc7+eyzRcvRHDVDxtr/TLZnfya4otxidEeO6+wodyUntBAuYxeOZX5 8jxzolDlOgV+T+l/5jxdvT+pXkQMnlC8E4GZzdn8F744iCbABOn5gzqfXEZgugFjQ03e d+lePHGFzFsZ/9iDW9C9EF88BgKGkpUxaJO3ltTVOTMVsiFPWaZ+Nl1S9yjyMvpLJcVY 8nlIuM3X1+ZnMP66iVyteIp/520/2IvNIq6gXKluwj/A21crvPD79f9hMoiM2o7c7tQm 9Sqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:reply-to:cc:from:to :dkim-signature:date; bh=nXSAlK8UrJiaG16jQkahBCPbIJiUcfyiYcToFFPWldo=; b=S7ACOujdNfbT5FOceU7lyeF8/CjL6KDJqp3djpWgaU4Fu65jfxtYrJYhmH1ELDTtD5 CUDLfXl+/WaSZgL1MqyJCJC43Y2IOQ+2n9FjBE0znhQAA4Y985Af7k2fNvKMfoNpQVjl IyZPPne/hY7YPBmCO7iP4TJ18EegJn5qXAolb1gEW0D8/fTjcGjoj87AdsxAnX8gq79i MxIaVBro8K3hjCD4/DdBCwB9+pYbxD4HDPf7zpdXJpqTB2DYbQ7H647+ydoH1WEBiJE7 FMlNcOTli7PqUt0aD/2vGU3gqIoc1VmjmReGQqxfieNzd8zp4jLLwU21aWdHPuVUXtx2 Q2yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@emersion.fr header.s=protonmail2 header.b="BBgZ/nUI"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=emersion.fr Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id fx21si1184798ejb.458.2020.10.23.09.38.24; Fri, 23 Oct 2020 09:38:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@emersion.fr header.s=protonmail2 header.b="BBgZ/nUI"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=emersion.fr Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751243AbgJWQCQ (ORCPT + 99 others); Fri, 23 Oct 2020 12:02:16 -0400 Received: from mail-03.mail-europe.com ([91.134.188.129]:41560 "EHLO mail-03.mail-europe.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751201AbgJWQCP (ORCPT ); Fri, 23 Oct 2020 12:02:15 -0400 Date: Fri, 23 Oct 2020 16:02:03 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emersion.fr; s=protonmail2; t=1603468931; bh=nXSAlK8UrJiaG16jQkahBCPbIJiUcfyiYcToFFPWldo=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=BBgZ/nUI3NA4LLj0XVLbCr7IXHUAAEOaYtUQsx3SObUMAMzjDcaFOjLDoylEkNySY yGNTKAt/5v1X+fK/vqwOfUbpTb7Rne1E5wRgOjBTpC+QG1lnrjy5hhK+4rxwoUq2yf 5UApw14a10Xa3oU1CScgO47vaZIBAce1EAVaFxaUaRMeuAqaDZhdTqwoAawN7nzsZa J5dTaeLaVlr/aLGYBmQ0xq6ns4oLmcPjmVqL+r53i56ke8qJDNe1Mqxk06p87caBHu RfLlM9/r/9mVs8WH0I7AU28tmzi44V2pzAoPLUBIKkISzzZTVb38qG6B+CSvnRZzCf g5Fm7ZvKyuT5g== To: =?utf-8?Q?Ville_Syrj=C3=A4l=C3=A4?= From: Simon Ser Cc: Randy Dunlap , David Airlie , intel-gfx , LKML , dri-devel , Pekka Paalanen Reply-To: Simon Ser Subject: Re: [Intel-gfx] drm_modes: signed integer overflow Message-ID: In-Reply-To: <20201023152719.GV6112@intel.com> References: <47527cdb-2eda-b5a3-d77c-3855b91a0b61@infradead.org> <20201022101423.GI6112@intel.com> <20201023152719.GV6112@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Friday, October 23, 2020 5:27 PM, Ville Syrj=C3=A4l=C3=A4 wrote: > These are two extreme cases: Thanks! > > I'm trying to get > > a fix for my user-space 1, and I'm wondering if int32_t is enough > > after dividing by mode->htotal. > > CC Pekka, just FYI (I think Weston has similar code). > > What's with those 1000000LL constants? Are you storing > clock in Hz units? We're storing the vertical refresh rate in mHz (milli-Hertz).