From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Tu Subject: Re: [PATCH] drm/i915: Increase max texture to 16k for gen9+ Date: Fri, 8 Dec 2017 11:24:08 +0800 Message-ID: References: <20171207092600.3727-1-alex.tu@canonical.com> <20171207153224.GD10981@intel.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0405076303==" Return-path: In-Reply-To: <20171207153224.GD10981@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: =?UTF-8?B?VmlsbGUgU3lyasOkbMOk?= Cc: David Airlie , intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Rodrigo Vivi List-Id: dri-devel@lists.freedesktop.org --===============0405076303== Content-Type: multipart/alternative; boundary="f403043868bc1903ce055fcbba03" --f403043868bc1903ce055fcbba03 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable looks it's not that easy as I thought. This change is for https://bugs.freedesktop.org/show_bug.cgi?id=3D102508 , and the hardware configuration is * 00:02.0 VGA compatible controller [0300]: Intel Corporation Device [8086:591d] (rev 04) * Dell Thunderbolt BME dock : http://www.dell.com/support/article/us/en/04/sln301105/dell-thunderbolt-doc= k--tb16--information-and-specifications?lang=3Den * internal native monitor is 4K, another 2 4K monitors are plugged behind BME dock This patch could let this setting work, but looks it not the correct way. Not see the the relevant math in original code of commit b321803dfb and ac484963f9 . Does someone know how the original value 8192 be calculated out? So that the way might could be followed for this new change. Thanks. On Thu, Dec 7, 2017 at 11:32 PM, Ville Syrj=C3=A4l=C3=A4 < ville.syrjala@linux.intel.com> wrote: > On Thu, Dec 07, 2017 at 05:26:00PM +0800, Alex Tu wrote: > > Rrefer to another patch [1] on mesa to extend width/height to 16384. > > For issue : > > - https://bugs.freedesktop.org/show_bug.cgi?id=3D102508 > > - LP: #1714178 Triple monitor display failed with Dell Dock (HiDPI) > > > > [1] https://patchwork.freedesktop.org/patch/124918/ > > > > Signed-off-by: Alex Tu > > --- > > drivers/gpu/drm/i915/intel_display.c | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/gpu/drm/i915/intel_display.c > b/drivers/gpu/drm/i915/intel_display.c > > index 47a2f6acee50..556fa57b18b8 100644 > > --- a/drivers/gpu/drm/i915/intel_display.c > > +++ b/drivers/gpu/drm/i915/intel_display.c > > @@ -13905,7 +13905,7 @@ u32 intel_fb_pitch_limit(struct drm_i915_privat= e > *dev_priv, > > /* "The stride in bytes must not exceed the of the size o= f > 8K > > * pixels and 32K bytes." > > The spec queote clearly says the patch is wrong. Either that or the spec > quote is outdated. > > > */ > > - return min(8192 * cpp, 32768); > > + return min(16384 * cpp, 65536); > > } else if (gen >=3D 5 && !HAS_GMCH_DISPLAY(dev_priv)) { > > return 32*1024; > > } else if (gen >=3D 4) { > > @@ -14604,8 +14604,8 @@ int intel_modeset_init(struct drm_device *dev) > > dev->mode_config.max_width =3D 4096; > > dev->mode_config.max_height =3D 4096; > > } else { > > - dev->mode_config.max_width =3D 8192; > > - dev->mode_config.max_height =3D 8192; > > + dev->mode_config.max_width =3D 16384; > > + dev->mode_config.max_height =3D 16384; > > Even if this would be correct (which it's not for most platforms at > least, not quite sure about the very latest hardware), anyone doing > this should at least do a cursory check of the relevant math in the > driver to make seure we don't end up with integer overflows. > > > } > > > > if (IS_I845G(dev_priv) || IS_I865G(dev_priv)) { > > -- > > 2.11.0 > > > > _______________________________________________ > > Intel-gfx mailing list > > Intel-gfx@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/intel-gfx > > -- > Ville Syrj=C3=A4l=C3=A4 > Intel OTC > --f403043868bc1903ce055fcbba03 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
looks it's not that easy as I thought.
This change= is for=C2=A0https://bugs.freedesktop.org/show_bug.cgi?id=3D102508 , and the har= dware configuration is

* 00:02.0 VGA compatib= le controller [0300]: Intel Corporation Device [8086:591d] (rev 04)
* internal native monitor is 4K, another 2 4K monitors are p= lugged behind BME dock

This patch could let this s= etting work, but looks it not the correct way.
Not see the the re= levant math in original code of commit=C2=A0b321803dfb and ac484963f9 .
Does so= meone know how the original value 8192 be calculated out?
So that= the way might could be followed for this new change.

<= div>Thanks.

On Thu, Dec 7, 2017 at 11:32 PM, Ville Syrj=C3=A4l=C3=A4 <ville.syrjala@linux.intel.com> wrote:
On Thu, Dec 07, 2017 at 05:26:00PM +0800, Al= ex Tu wrote:
> Rrefer to another patch [1] on mesa to extend width/height to 16384. > For issue :
>=C2=A0 - https://bugs.freedesktop.org/= show_bug.cgi?id=3D102508
>=C2=A0 - LP: #1714178 Triple monitor display failed with Dell Dock (HiD= PI)
>
> [1] https://patchwork.freedesktop.org/patch= /124918/
>
> Signed-off-by: Alex Tu <al= ex.tu@canonical.com>
> ---
>=C2=A0 drivers/gpu/drm/i915/intel_display.c | 6 +++---
>=C2=A0 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/d= rm/i915/intel_display.c
> index 47a2f6acee50..556fa57b18b8 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -13905,7 +13905,7 @@ u32 intel_fb_pitch_limit(struct drm_i915_priva= te *dev_priv,
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0/* "The str= ide in bytes must not exceed the of the size of 8K
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 *=C2=A0 pixels = and 32K bytes."

The spec queote clearly says the patch is wrong. Either that or the = spec
quote is outdated.

>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 */
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return min(8192 * cpp= , 32768);
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return min(16384 * cp= p, 65536);
>=C2=A0 =C2=A0 =C2=A0 =C2=A0} else if (gen >=3D 5 && !HAS_GMC= H_DISPLAY(dev_priv)) {
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0return 32*1024;<= br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0} else if (gen >=3D 4) {
> @@ -14604,8 +14604,8 @@ int intel_modeset_init(struct drm_device *dev)=
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0dev->mode_con= fig.max_width =3D 4096;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0dev->mode_con= fig.max_height =3D 4096;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0} else {
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0dev->mode_config.m= ax_width =3D 8192;
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0dev->mode_config.m= ax_height =3D 8192;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0dev->mode_config.m= ax_width =3D 16384;
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0dev->mode_config.m= ax_height =3D 16384;

Even if this would be correct (which it's not for most platforms= at
least, not quite sure about the very latest hardware), anyone doing
this should at least do a cursory check of the relevant math in the
driver to make seure we don't end up with integer overflows.

>=C2=A0 =C2=A0 =C2=A0 =C2=A0}
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0if (IS_I845G(dev_priv) || IS_I865G(dev_priv)= ) {
> --
> 2.11.0
>
> _______________________= ________________________
> Intel-gfx mailing list
> Intel-gfx@lists.fre= edesktop.org
> https://lists.freedesktop.org/mail= man/listinfo/intel-gfx

--
Ville Syrj=C3=A4= l=C3=A4
Intel OTC

--f403043868bc1903ce055fcbba03-- --===============0405076303== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KSW50ZWwtZ2Z4 IG1haWxpbmcgbGlzdApJbnRlbC1nZnhAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vaW50ZWwtZ2Z4Cg== --===============0405076303==--