Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: intel-xe@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
	"Chery, Nanley G" <nanley.g.chery@intel.com>,
	"Saarinen, Jani" <jani.saarinen@intel.com>,
	"Graunke, Kenneth W" <kenneth.w.graunke@intel.com>,
	"Souza, Jose" <jose.souza@intel.com>,
	"Mathew, Alwin" <alwin.mathew@intel.com>,
	"Zhang, Jianxun" <jianxun.zhang@intel.com>,
	"Nikula, Jani" <jani.nikula@intel.com>
Subject: Re: [RFC PATCH 3/3] drm/i915/display: allow creation of case I915_FORMAT_MOD_4_TILED_XE2_CCS type framebuffer
Date: Tue, 7 May 2024 19:43:27 +0300	[thread overview]
Message-ID: <ec2b911d-023b-423c-9c01-3fec208da7f3@gmail.com> (raw)
In-Reply-To: <ZjpRcqvy7BSCV5fo@intel.com>

On 7.5.2024 19.06, Ville Syrjälä wrote:
> On Mon, May 06, 2024 at 09:52:38PM +0300, Juha-Pekka Heikkila wrote:
>> Add I915_FORMAT_MOD_4_TILED_XE2_CCS to possible created tiling for new framebuffer
>> on Xe driver.
>>
>> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
>> ---
>>   drivers/gpu/drm/i915/display/intel_display.c       |  1 +
>>   drivers/gpu/drm/i915/display/intel_fb.c            | 10 ++++++++++
>>   drivers/gpu/drm/i915/display/skl_universal_plane.c |  4 +++-
>>   3 files changed, 14 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
>> index ef986b508431..083147a21edb 100644
>> --- a/drivers/gpu/drm/i915/display/intel_display.c
>> +++ b/drivers/gpu/drm/i915/display/intel_display.c
>> @@ -6150,6 +6150,7 @@ static int intel_async_flip_check_hw(struct intel_atomic_state *state, struct in
>>   		case I915_FORMAT_MOD_Y_TILED:
>>   		case I915_FORMAT_MOD_Yf_TILED:
>>   		case I915_FORMAT_MOD_4_TILED:
>> +		case I915_FORMAT_MOD_4_TILED_XE2_CCS:
>>   			break;
>>   		default:
>>   			drm_dbg_kms(&i915->drm,
>> diff --git a/drivers/gpu/drm/i915/display/intel_fb.c b/drivers/gpu/drm/i915/display/intel_fb.c
>> index bf24f48a1e76..6a44746b8381 100644
>> --- a/drivers/gpu/drm/i915/display/intel_fb.c
>> +++ b/drivers/gpu/drm/i915/display/intel_fb.c
>> @@ -161,6 +161,10 @@ struct intel_modifier_desc {
>>   
>>   static const struct intel_modifier_desc intel_modifiers[] = {
>>   	{
>> +		.modifier = I915_FORMAT_MOD_4_TILED_XE2_CCS,
>> +		.display_ver = { 14, -1 },
> 
> Should that say 20?

No, 14 is smallest display version where this can be used. (and graphics 
version 20)

> 
>> +		.plane_caps = INTEL_PLANE_CAP_TILING_4,
>> +	}, {
>>   		.modifier = I915_FORMAT_MOD_4_TILED_MTL_MC_CCS,
>>   		.display_ver = { 14, 14 },
>>   		.plane_caps = INTEL_PLANE_CAP_TILING_4 | INTEL_PLANE_CAP_CCS_MC,
>> @@ -435,6 +439,10 @@ static bool plane_has_modifier(struct drm_i915_private *i915,
>>   	    HAS_FLAT_CCS(i915) != !md->ccs.packed_aux_planes)
>>   		return false;
>>   
>> +	if (md->modifier == I915_FORMAT_MOD_4_TILED_XE2_CCS &&
>> +	    GRAPHICS_VER(i915) < 20)
>> +		return false;
>> +
>>   	return true;
>>   }
>>   
>> @@ -657,6 +665,7 @@ intel_tile_width_bytes(const struct drm_framebuffer *fb, int color_plane)
>>   			return 128;
>>   		else
>>   			return 512;
>> +	case I915_FORMAT_MOD_4_TILED_XE2_CCS:
>>   	case I915_FORMAT_MOD_4_TILED_DG2_RC_CCS:
>>   	case I915_FORMAT_MOD_4_TILED_DG2_RC_CCS_CC:
>>   	case I915_FORMAT_MOD_4_TILED_DG2_MC_CCS:
>> @@ -858,6 +867,7 @@ unsigned int intel_surf_alignment(const struct drm_framebuffer *fb,
>>   	case I915_FORMAT_MOD_4_TILED_MTL_RC_CCS:
>>   	case I915_FORMAT_MOD_4_TILED_MTL_RC_CCS_CC:
>>   		return 16 * 1024;
>> +	case I915_FORMAT_MOD_4_TILED_XE2_CCS:
>>   	case I915_FORMAT_MOD_Y_TILED_CCS:
>>   	case I915_FORMAT_MOD_Yf_TILED_CCS:
>>   	case I915_FORMAT_MOD_Y_TILED:
>> diff --git a/drivers/gpu/drm/i915/display/skl_universal_plane.c b/drivers/gpu/drm/i915/display/skl_universal_plane.c
>> index 0a8e781a3648..e590fea1180a 100644
>> --- a/drivers/gpu/drm/i915/display/skl_universal_plane.c
>> +++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c
>> @@ -792,6 +792,7 @@ static u32 skl_plane_ctl_tiling(u64 fb_modifier)
>>   	case I915_FORMAT_MOD_Y_TILED:
>>   		return PLANE_CTL_TILED_Y;
>>   	case I915_FORMAT_MOD_4_TILED:
>> +	case I915_FORMAT_MOD_4_TILED_XE2_CCS:
>>   		return PLANE_CTL_TILED_4;
>>   	case I915_FORMAT_MOD_4_TILED_DG2_RC_CCS:
>>   		return PLANE_CTL_TILED_4 |
>> @@ -949,7 +950,8 @@ static u32 skl_plane_ctl(const struct intel_crtc_state *crtc_state,
>>   		plane_ctl |= adlp_plane_ctl_arb_slots(plane_state);
>>   
>>   	if (GRAPHICS_VER(dev_priv) >= 20 &&
>> -	    fb->modifier == I915_FORMAT_MOD_4_TILED) {
>> +	    (fb->modifier == I915_FORMAT_MOD_4_TILED ||
>> +	     fb->modifier == I915_FORMAT_MOD_4_TILED_XE2_CCS)) {
>>   		plane_ctl |= PLANE_CTL_RENDER_DECOMPRESSION_ENABLE;
> 
> If we got to the trouble of adding a new modifier then we should
> just let skl_plane_ctl_tiling() handle this, like it does for
> every other platform.

yea, this will need to be moved. Otherwise here start to gather clutter.

> 
>>   	}
>>   
>> -- 
>> 2.43.2
> 


  reply	other threads:[~2024-05-07 16:43 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-06 18:52 [RFC PATCH 0/3] Introducing I915_FORMAT_MOD_4_TILED_XE2_CCS Modifier for Xe2 Juha-Pekka Heikkila
2024-05-06 18:52 ` [RFC PATCH 1/3] drm/fourcc: define Intel Xe2 related tile4 ccs modifier Juha-Pekka Heikkila
2024-06-04 15:54   ` Chery, Nanley G
2024-05-06 18:52 ` [RFC PATCH 2/3] drm/xe/display: allow creation of case I915_FORMAT_MOD_4_TILED_XE2_CCS type framebuffer Juha-Pekka Heikkila
2024-05-07 16:07   ` Ville Syrjälä
2024-05-07 16:41     ` Juha-Pekka Heikkila
2024-05-06 18:52 ` [RFC PATCH 3/3] drm/i915/display: " Juha-Pekka Heikkila
2024-05-07 16:06   ` Ville Syrjälä
2024-05-07 16:43     ` Juha-Pekka Heikkila [this message]
2024-05-06 23:53 ` ✓ CI.Patch_applied: success for Introducing I915_FORMAT_MOD_4_TILED_XE2_CCS Modifier for Xe2 Patchwork
2024-05-06 23:53 ` ✗ CI.checkpatch: warning " Patchwork
2024-05-06 23:54 ` ✓ CI.KUnit: success " Patchwork
2024-05-07  0:06 ` ✓ CI.Build: " Patchwork
2024-05-07  0:09 ` ✓ CI.Hooks: " Patchwork
2024-05-07  0:10 ` ✗ CI.checksparse: warning " Patchwork
2024-05-07  0:56 ` ✓ CI.BAT: success " Patchwork
2024-05-07  5:48 ` ✓ CI.FULL: " Patchwork
2024-05-07 22:56 ` [RFC PATCH 0/3] " Matt Roper
2024-05-08 13:08   ` Juha-Pekka Heikkila
2024-05-11  0:58   ` Kenneth Graunke
2024-05-14  9:25     ` Joonas Lahtinen
2024-05-14 16:51       ` Thomas Hellström
2024-07-19 20:17         ` Zhang, Jianxun
2024-07-23 22:51           ` Chery, Nanley G

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=ec2b911d-023b-423c-9c01-3fec208da7f3@gmail.com \
    --to=juhapekka.heikkila@gmail.com \
    --cc=alwin.mathew@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    --cc=jani.saarinen@intel.com \
    --cc=jianxun.zhang@intel.com \
    --cc=jose.souza@intel.com \
    --cc=kenneth.w.graunke@intel.com \
    --cc=nanley.g.chery@intel.com \
    --cc=ville.syrjala@linux.intel.com \
    /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