From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tomi Valkeinen Subject: Re: [PATCH 4/6] drm/omap: Allow allocation of larger buffers Date: Mon, 14 Apr 2014 13:30:34 +0300 Message-ID: <534BB8CA.6050208@ti.com> References: <1397201015-2807-1-git-send-email-archit@ti.com> <1397201015-2807-5-git-send-email-archit@ti.com> <534BA98F.10004@ti.com> <534BB60A.4050202@ti.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0365181389==" Return-path: Received: from bear.ext.ti.com (bear.ext.ti.com [192.94.94.41]) by gabe.freedesktop.org (Postfix) with ESMTP id 939236E051 for ; Mon, 14 Apr 2014 03:30:39 -0700 (PDT) In-Reply-To: <534BB60A.4050202@ti.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Archit Taneja , robdclark@gmail.com Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0365181389== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="xe564oH6qr3nhromSxn84LD8lCBGDurN1" --xe564oH6qr3nhromSxn84LD8lCBGDurN1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 14/04/14 13:18, Archit Taneja wrote: > On Monday 14 April 2014 02:55 PM, Tomi Valkeinen wrote: >> On 11/04/14 10:23, Archit Taneja wrote: >>> The drm ioctl DRM_IOCTL_MODE_ADDFB2 doesn't let us allocate buffers >>> which are >>> greater than what is specified in the driver through dev->mode_config= =2E >>> >>> Create helpers for DISPC which return the max manager width and >>> height supported >>> by the device. The maximum width for a framebuffer is set to the >>> combined width >>> of the all the crtcs, assuming they are arranged horizontally. >>> >>> Signed-off-by: Archit Taneja >>> --- >>> drivers/gpu/drm/omapdrm/omap_drv.c | 10 ++++++---- >>> drivers/video/omap2/dss/dispc.c | 12 ++++++++++++ >>> include/video/omapdss.h | 2 ++ >>> 3 files changed, 20 insertions(+), 4 deletions(-) >>> >>> diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c >>> b/drivers/gpu/drm/omapdrm/omap_drv.c >>> index c8270e4..55ec575 100644 >>> --- a/drivers/gpu/drm/omapdrm/omap_drv.c >>> +++ b/drivers/gpu/drm/omapdrm/omap_drv.c >>> @@ -306,11 +306,13 @@ static int omap_modeset_init(struct drm_device >>> *dev) >>> dev->mode_config.min_width =3D 32; >>> dev->mode_config.min_height =3D 32; >>> >>> - /* note: eventually will need some cpu_is_omapXYZ() type stuff h= ere >>> - * to fill in these limits properly on different OMAP generation= s.. >>> + /* >>> + * Note: the maximum width is set to the combined width of all t= he >>> + * crtcs. We could assume the same for the maximum height too, b= ut >>> + * we generally don't use such a configuration. >>> */ >>> - dev->mode_config.max_width =3D 2048; >>> - dev->mode_config.max_height =3D 2048; >>> + dev->mode_config.max_width =3D num_crtcs * dispc_mgr_max_width()= ; >>> + dev->mode_config.max_height =3D dispc_mgr_max_height(); >> >> This looks very strange. >> >> If the max size is supposed to be the maximum output size we support, >> then multiplying with num_crtcs doesn't make sense. >> >> If, on the other hand, it tells the possible maximum size of the >> framebuffer in the memory, of which only small part is shown (where's >> the max size of that "part" defined, then?), then there should be no >> limits as the only limit is the size of the memory. >=20 > These parameters are used to tell the max size of framebuffer we can > allocate in memory. >=20 > I'm not sure why there is a limit in the first place, but if we have a > really low minimum(like 2048 pixels right now), we can't have multiple > displays showing different regions of the same buffer. In that case shouldn't the limit be 0 (if that's allowed) or some surely high enough value, say, 32767. Why calculate it at all based on the dispc's maximum, if it has no relevance? Tomi --xe564oH6qr3nhromSxn84LD8lCBGDurN1 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (GNU/Linux) iQIcBAEBAgAGBQJTS7jKAAoJEPo9qoy8lh71RWEP/i7lDu4aai300VyT00epMPAH nUOPy5TKx6e9QP/kCz7LB+LxBaG4dES1rismWZ4lBl1/83MpUky3UWkb3hhF3nUc HSF0YvAzEsiK91srq7qOISQhrelVTV3KRYXYtXZEzO3IYTFneiPmR6+J27IGk7b8 pS6yEKdoltzLWeajuBeFPDKAQDrGVzeDwb7+6/oddav7TYENoSC6zAteEtA0EWH9 kcDC6LAXFasfhgMXn+19DtkmBSWeQ8zpAX3c9ZavRenVA7s+iEA/Kf81ILrGcPkC bIoPYw4YAFozwOtxaPIdym+78QZLy1vI9L6bF+JGkiOWSrEbiLDOLK7bS2mJhV+W rpQt9JBTzSpIrSI6T3aSrb0URd0wT/ch9E2rVlpJ/RMVidbx303TqJSNkXuEYDXX vbfq0w9M7Z1NRhPdwbajBpLgkraTJE+SnWuqwuQcjlMFlLk/Qef16xlUqcsUxUl9 iR1FBBd7ph9V+YpPFxwF2JFKE+YIZAVWFCTEAwVTPP58p2DiBw6pokpuJNcY8X8e jDnjK8UhYSvFMuQGGEysWrXiFMotoSnR4iYp9swqqPHh1mes+TbzloJQM7NOc4d2 XDdpm3HGgF989PoJlXSaOc10MlLTCoII0yQS85O+EF38WvoFoWXHAFsR7ZOXIhrJ For9uu1aKCDk2P6oIdBN =pgVC -----END PGP SIGNATURE----- --xe564oH6qr3nhromSxn84LD8lCBGDurN1-- --===============0365181389== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel --===============0365181389==--