Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Bas S <schalbroeck@gmail.com>
Cc: <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH] drm/i915/display: Allow tighter hblank span
Date: Mon, 19 Feb 2024 15:20:20 -0500	[thread overview]
Message-ID: <ZdO4BNYXKo9ZKR9J@intel.com> (raw)
In-Reply-To: <CAAuj=_fEjHCsGYzdA20LvP_292oaTHEC4PE4uNFdWHE4UkBMJw@mail.gmail.com>

On Sun, Feb 18, 2024 at 07:12:24PM +0100, Bas S wrote:
>    I ran into an issue with the i915 driver not being able to drive a display   
>    with this specific modeline:                                                 

Could you please file a bug on this?

https://drm.pages.freedesktop.org/intel-docs/how-to-file-i915-bugs.html

The limits below are per platform/display-architecture and probably forgotten
to get updates for newer platforms. But having more information about your
platform would be very helpful.

Thanks,
Rodrigo.

>                                                                                 
>    [drm]] Modeline "1920x720": 60 120980 1920 1932 1936 1948 720 723 733 1035   
>    0x48 0x9                                                                     
>    [drm:drm_mode_prune_invalid [drm]] Not using 1920x720 mode: H_ILLEGAL        
>                                                                                 
>    After some investigation I found that intel_mode_valid (and in newer         
>    kernels, intel_cpu_transcoder_mode_valid) returns MODE_H_ILLEGAL due to      
>    (htotal - hdisplay) being lower than 32.                                     
>    The modeline in question indeed does not satisfy this constraint, as         
>    HTOTAL(1948) - HDISPLAY(1920) equals 28.                                     
>    Changing the driver code to allow for a hblank span of 28 pixels or lower    
>    resulted in the driver successfully rendering to the display.                
>    As such I propose this patch to allow for a tighter hblank span.             
>                                                                                 
>    Nb: I am uncertain if the hblank span of 32 pixels has been chosen           
>    deliberately and what the side-effects could be of lowering this value.      
>    Any insights into this or alternative solutions would be very much           
>    appreciated! I also considered introducing a kernel module parameter to      
>    optionally loosen these mode constraints.                                    
>                                                                                 
>    The referenced modeline is present in a line of ultrawide signage displays   
>    and has been known to work on other graphics drivers/OSes.                   
>                                                                                 
>    Signed-off-by: Sebastiaan Schalbroeck <[1]schalbroeck@gmail.com>             
>    ---                                                                          
>     drivers/gpu/drm/i915/display/intel_display.c | 4 ++--                       
>     1 file changed, 2 insertions(+), 2 deletions(-)                             
>                                                                                 
>    diff --git a/drivers/gpu/drm/i915/display/intel_display.c                    
>    b/drivers/gpu/drm/i915/display/intel_display.c                               
>    index b10aad1..f6aba1d 100644                                                
>    --- a/drivers/gpu/drm/i915/display/intel_display.c                           
>    +++ b/drivers/gpu/drm/i915/display/intel_display.c                           
>    @@ -7745,13 +7745,13 @@ enum drm_mode_status                                 
>    intel_cpu_transcoder_mode_valid(struct drm_i915_private *de                  
>             */                                                                  
>            if (DISPLAY_VER(dev_priv) >= 5) {                                    
>                    if (mode->hdisplay < 64 ||                                   
>    -                   mode->htotal - mode->hdisplay < 32)                      
>    +                   mode->htotal - mode->hdisplay < 28)                      
>                            return MODE_H_ILLEGAL;                               
>                                                                                 
>                    if (mode->vtotal - mode->vdisplay < 5)                       
>                            return MODE_V_ILLEGAL;                               
>            } else {                                                             
>    -               if (mode->htotal - mode->hdisplay < 32)                      
>    +               if (mode->htotal - mode->hdisplay < 28)                      
>                            return MODE_H_ILLEGAL;                               
>                                                                                 
>                    if (mode->vtotal - mode->vdisplay < 3)                       
>                                                                                 
>    --                                                                           
>    2.39.2                                                                       
> 
> References
> 
>    Visible links
>    1. mailto:schalbroeck@gmail.com

      parent reply	other threads:[~2024-02-19 20:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-18 18:12 [PATCH] drm/i915/display: Allow tighter hblank span Bas S
2024-02-19 16:12 ` ✗ Fi.CI.BUILD: failure for " Patchwork
2024-02-19 20:20 ` Rodrigo Vivi [this message]

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=ZdO4BNYXKo9ZKR9J@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=schalbroeck@gmail.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