Query about INTEL modifiers referred in intel_display.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux