AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Kazlauskas, Nicholas" <Nicholas.Kazlauskas-5C7GfCeVMHo@public.gmane.org>
To: "Michel Dänzer" <michel-otUistvHUpPR7s880joybQ@public.gmane.org>
Cc: "amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: Re: [PATCH 06/18] drm/amd/display: Drop underlay plane support
Date: Tue, 5 Mar 2019 17:15:24 +0000	[thread overview]
Message-ID: <0090d693-da7d-ec97-4d2e-5a109d2bc4fc@amd.com> (raw)
In-Reply-To: <daf986ad-a939-05d2-8ee5-e103727d6b1d-otUistvHUpPR7s880joybQ@public.gmane.org>

On 3/5/19 12:09 PM, Michel Dänzer wrote:
> On 2019-02-25 11:46 p.m., Bhawanpreet Lakha wrote:
>> From: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
>>
>> [Why]
>> Primary and underlay planes were previously exposed to DRM by using
>> max_planes and max_slave_planes.
>>
>> The value for max_planes was always pipe_count + has_underlay.
>> If there was an underlay pipe, then max_slave_planes = 1.
>>
>> Raven has pipe_count = 4, max_planes = 4, and max_slave_planes = 1.
>> So during plane initialziation it was actually "creating"
>> 1 overlay plane and 3 primary planes... or it would be, had its
>> plane_type array not been dm_plane_type_default, which will only create
>> DRM_PLANE_TYPE_PRIMARY planes.
>>
>> We can expose primary planes as supporting more than one CRTC at a time
>> to more closely resemble plane behavior on DCN but userspace doesn't
>> really expect planes to be used in this manner and will either
>> ignore the planes or crash.
>>
>> Planes with index greater than max_streams are marked as supporting
>> all CRTCs. No ASIC currently has primary plane count greater than the
>> stream count but we shouldn't expose more than necessary.
>>
>> [How]
>> Drop support for underlay planes. They aren't well tested and don't
>> fully work right at the moment.
>>
>> Only create one primary plane per CRTC so we're not creating overlays.
>>
>> Initialize plane types directly instead of referencing a misleading
>> array of plane types.
>>
>> Change-Id: Ibdf1caa8a2be42df6f7574dae97c49734fa44151
>> Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
>> Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
>> Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
>>
>>
>> [...]
>>
>> @@ -1925,21 +1901,17 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
>>   		return -EINVAL;
>>   	}
>>   
>> -	/* Identify the number of planes to be initialized */
>> -	total_overlay_planes = dm->dc->caps.max_slave_planes;
>> -	total_primary_planes = dm->dc->caps.max_planes - dm->dc->caps.max_slave_planes;
>> +	/* There is one primary plane per CRTC */
>> +	primary_planes = dm->dc->caps.max_streams;
>> +	ASSERT(primary_planes < AMDGPU_MAX_PLANES);
> 
> This assertion fails for me with Bonaire. In fact, since
> AMDGPU_MAX_PLANES is 6, and primary_planes seems to be the number of
> CRTCs, it'll fail with most GPUs?
> 
> Maybe it was meant to be <= instead of < ?
> 
> 

Yeah, that should have been a <= . It would fail on anything with 6 at 
least. I think because it happens early in the init process it doesn't 
show any warnings or errors in IGT testing.

I'll go ahead and fix this one up, thanks.

I think I could probably drop the whole mode_info->planes array in a 
separate patch too since it doesn't really serve much of a purpose now 
(it was only used for checking the type during initialization).

Nicholas Kazlauskas
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2019-03-05 17:15 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-25 22:45 [PATCH 00/18] DC Patches 25 Feb 2019 Bhawanpreet Lakha
     [not found] ` <20190225224615.4507-1-Bhawanpreet.Lakha-5C7GfCeVMHo@public.gmane.org>
2019-02-25 22:45   ` [PATCH 01/18] drm/amd/display: add full update commit hint struct Bhawanpreet Lakha
2019-02-25 22:45   ` [PATCH 02/18] drm/amd/display: Add function to create 4d19 fixed point Bhawanpreet Lakha
2019-02-25 22:46   ` [PATCH 03/18] drm/amd/display: Respect aux return values Bhawanpreet Lakha
2019-02-25 22:46   ` [PATCH 04/18] drm/amd/display: Set stream->mode_changed when connectors change Bhawanpreet Lakha
2019-02-25 22:46   ` [PATCH 05/18] drm/amd/display: Add plane capabilities to dc_caps Bhawanpreet Lakha
2019-02-25 22:46   ` [PATCH 06/18] drm/amd/display: Drop underlay plane support Bhawanpreet Lakha
     [not found]     ` <20190225224615.4507-7-Bhawanpreet.Lakha-5C7GfCeVMHo@public.gmane.org>
2019-03-05 17:09       ` Michel Dänzer
     [not found]         ` <daf986ad-a939-05d2-8ee5-e103727d6b1d-otUistvHUpPR7s880joybQ@public.gmane.org>
2019-03-05 17:15           ` Kazlauskas, Nicholas [this message]
2019-02-25 22:46   ` [PATCH 07/18] drm/amd/display: Create overlay planes Bhawanpreet Lakha
     [not found]     ` <20190225224615.4507-8-Bhawanpreet.Lakha-5C7GfCeVMHo@public.gmane.org>
2019-02-27  4:03       ` Vishwakarma, Pratik
     [not found]         ` <390d83da-8de3-08df-4215-e9f2e4502ee8-5C7GfCeVMHo@public.gmane.org>
2019-02-27 12:50           ` Nicholas Kazlauskas
2019-02-25 22:46   ` [PATCH 08/18] drm/amd/display: Allow pflips from a framebuffer to itself Bhawanpreet Lakha
2019-02-25 22:46   ` [PATCH 09/18] drm/amd/display: Refactor pageflips plane commit Bhawanpreet Lakha
2019-02-25 22:46   ` [PATCH 10/18] drm/amd/display: Keep clocks high before seamless boot done Bhawanpreet Lakha
2019-02-25 22:46   ` [PATCH 11/18] drm/amd/display: half bandwidth for YCbCr420 during validation Bhawanpreet Lakha
2019-02-25 22:46   ` [PATCH 12/18] Revert "drm/amd/display: dcn add check surface in_use" Bhawanpreet Lakha
2019-02-25 22:46   ` [PATCH 13/18] drm/amd/display: Re-add custom degamma support Bhawanpreet Lakha
2019-02-25 22:46   ` [PATCH 14/18] drm/amd/display: Update plane tiling attributes for stream updates Bhawanpreet Lakha
2019-02-25 22:46   ` [PATCH 15/18] drm/amd/display: Fix soft hang issue when some DPCD data invalid Bhawanpreet Lakha
2019-02-25 22:46   ` [PATCH 16/18] drm/amd/display: 3.2.20 Bhawanpreet Lakha
2019-02-25 22:46   ` [PATCH 17/18] drm/amd/display: Add pp_smu null pointer check Bhawanpreet Lakha
2019-02-25 22:46   ` [PATCH 18/18] drm/amd/display: Fix Divide by 0 in memory calculations Bhawanpreet Lakha

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0090d693-da7d-ec97-4d2e-5a109d2bc4fc@amd.com \
    --to=nicholas.kazlauskas-5c7gfcevmho@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=michel-otUistvHUpPR7s880joybQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox