Re: [PATCH] drm/i915: Remove fb pitch limit for no display

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

 



On Thu, Sep 13, 2018 at 11:39:23AM +0100, Chris Wilson wrote:
> If there is not a display (and so no CRTCs) then there is no upper limit
> to the framebuffer pitch imposed by the CRTC.

Should we still allow you to create framebuffers in that case?

If yes then my plan to also query the planes which pixel formats/modifiers
to accept in addfb is going to hit hard times.

> 
> Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/intel_display.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 3be5fa0acee8..7db14086fb02 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -14403,9 +14403,9 @@ static const struct drm_framebuffer_funcs intel_fb_funcs = {
>  	.dirty = intel_user_framebuffer_dirty,
>  };
>  
> -static
> -u32 intel_fb_pitch_limit(struct drm_i915_private *dev_priv,
> -			 uint64_t fb_modifier, uint32_t pixel_format)
> +static u32
> +intel_fb_pitch_limit(struct drm_i915_private *dev_priv,
> +		     uint64_t fb_modifier, uint32_t pixel_format)
>  {
>  	struct intel_crtc *crtc;
>  	struct intel_plane *plane;
> @@ -14415,6 +14415,9 @@ u32 intel_fb_pitch_limit(struct drm_i915_private *dev_priv,
>  	 * the highest stride limits of them all.
>  	 */
>  	crtc = intel_get_crtc_for_pipe(dev_priv, PIPE_A);
> +	if (!crtc)
> +		return U32_MAX;
> +
>  	plane = to_intel_plane(crtc->base.primary);
>  
>  	return plane->max_stride(plane, pixel_format, fb_modifier,
> -- 
> 2.19.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux