• Chandra Konduru's avatar
    drm/i915: Upscale scaler max scale for NV12 · 77224cd5
    Chandra Konduru authored
    This patch updates scaler max limit support for NV12
    
    v2: Rebased (me)
    
    v3: Rebased (me)
    
    v4: Missed the Tested-by/Reviewed-by in the previous series
    Adding the same to commit message in this version.
    
    v5: Addressed review comments from Ville and rebased
    - calculation of max_scale to be made
    less convoluted by splitting it up a bit
    - Indentation errors to be fixed in the series
    
    v6: Rebased (me)
    Fixed review comments from Paauwe, Bob J
    Previous version, where a split of calculation
    was done, was wrong. Fixed that issue here.
    
    v7: Rebased (me)
    
    v8: Rebased (me)
    
    v9: Rebased (me)
    
    v10: Rebased (me)
    
    v11: Addressed review comments from Shashank Sharma
    Alignment issues fixed.
    When call to skl_update_scaler is made, 0 was being
    sent instead of pixel_format.
    When crtc update scaler is called, we dont have the
    fb to derive the pixel format. Added the function
    parameter bool plane_scaler_check to account for this.
    
    v12: Fixed failure in IGT debugfs_test.
    fb is NULL in skl_update_scaler_plane
    Due to this, accessing fb->format caused failure.
    Patch checks fb before using.
    
    v13: In the previous version there was a flaw.
    In skl_update_scaler during plane_scaler_check
    if the format was non-NV12, it would set need_scaling
    to false. This could reset the previously set need_scaling
    from a previous condition check. Patch fixes this.
    Patch also adds minimum src height for YUV 420 formats
    to 16 (as defined in BSpec) and adds for checking this
    range.
    
    v14: Addressed review comments from Maarten
    Just add a check for NV12 min src height in
    skl_update_scaler and retain the remaining checks
    as is. Added Reviewed By from Juha-Pekka Heikkila.
    
    v15: Rebased the series.
    
    v16: Changed fb height restriction to be >= 16 as per
    Bspec. Earlier it was > 16.
    
    v17: Adding src width and height to be mult of 4 restriction
    to avoid pipe fifo underruns for NV12.
    
    Credits-to: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
    Tested-by: default avatarClinton Taylor <clinton.a.taylor@intel.com>
    Reviewed-by: default avatarClinton Taylor <clinton.a.taylor@intel.com>
    Reviewed-by: default avatarJuha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
    Signed-off-by: default avatarChandra Konduru <chandra.konduru@intel.com>
    Signed-off-by: default avatarNabendu Maiti <nabendu.bikash.maiti@intel.com>
    Signed-off-by: default avatarVidya Srinivas <vidya.srinivas@intel.com>
    Reviewed-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
    Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/1523245273-30264-15-git-send-email-vidya.srinivas@intel.com
    77224cd5
intel_sprite.c 45.2 KB