Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ayan Halder <ayan.halder@arm.com>
To: jani.nikula@linux.intel.com, joonas.lahtinen@linux.intel.com,
	rodrigo.vivi@intel.com, airlied@linux.ie,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Cc: nd@arm.com
Subject: Query about INTEL modifiers referred in intel_display.c
Date: Thu, 17 May 2018 11:55:47 +0100	[thread overview]
Message-ID: <20180517105547.GA4328@arm.com> (raw)

Hi,

I was going through drivers/gpu/drm/i915/intel_display.c to get an
understanding about how framebuffer modifiers are used in the drm
subsystem. 
I could see the following in intel_framebuffer_init(),
(added in commit 2e2adb0573)

<< some code >>
    switch (mode_cmd->modifier[0]) { 
    case I915_FORMAT_MOD_Y_TILED_CCS:
    case I915_FORMAT_MOD_Yf_TILED_CCS:
        switch (mode_cmd->pixel_format) {
        case DRM_FORMAT_XBGR8888:
        case DRM_FORMAT_ABGR8888:
        case DRM_FORMAT_XRGB8888:
        case DRM_FORMAT_ARGB8888:
            break;
        default:
            DRM_DEBUG_KMS("RC supported only with RGB8888 formats\n");
            goto err;
    }
<< some code >>

And I see the following intel_primary_plane_format_mod_supported() -->
skl_mod_supported()
(added in commit 714244e280)

<< some code >>
    switch (format) {                                                                                 
    case DRM_FORMAT_XRGB8888:                                                                         
    case DRM_FORMAT_XBGR8888:                                                                         
    case DRM_FORMAT_ARGB8888:                                                                         
    case DRM_FORMAT_ABGR8888:                                                                         
        if (modifier == I915_FORMAT_MOD_Yf_TILED_CCS ||                                               
            modifier == I915_FORMAT_MOD_Y_TILED_CCS)                                                  
            return true;
<< some code >>

Is it a case of duplicacy? If we are checking for valid
combination of formats and modifiers in intel_framebuffer_init(), then why do we 
need to check it again in skl_mod_supported()? 

Can we just check the valid combination only in
skl_mod_supported() and not in intel_framebuffer_init() ?

Please let me know if I misunderstood something.

Thanks,
Ayan Kumar Halder
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

             reply	other threads:[~2018-05-17 10:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-17 10:55 Ayan Halder [this message]
2018-05-17 12:31 ` Query about INTEL modifiers referred in intel_display.c Ville Syrjälä

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=20180517105547.GA4328@arm.com \
    --to=ayan.halder@arm.com \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nd@arm.com \
    --cc=rodrigo.vivi@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