[PATCH i-g-t 1/2] lib/igt_kms: Add 6k resolution support for a single CRTC

B, Jeevan jeevan.b at intel.com
Thu Nov 21 10:15:20 UTC 2024


> -----Original Message-----
> From: Sharma, Swati2 <swati2.sharma at intel.com>
> Sent: Friday, November 15, 2024 1:47 AM
> To: B, Jeevan <jeevan.b at intel.com>; igt-dev at lists.freedesktop.org
> Subject: Re: [PATCH i-g-t 1/2] lib/igt_kms: Add 6k resolution support for a single
> CRTC
> 
> Hi Jeevan,
> 
> On 12-11-2024 10:04 pm, Jeevan B wrote:
> > increase big_joiner limitation to 6k from 5k for display version
> > greater than 30.
> >
> > Bspec: 68858
> >
> > Signed-off-by: Jeevan B <jeevan.b at intel.com>
> > ---
> >   lib/igt_kms.c | 22 ++++++++++++++--------
> >   lib/igt_kms.h |  5 +++--
> >   2 files changed, 17 insertions(+), 10 deletions(-)
> >
> > diff --git a/lib/igt_kms.c b/lib/igt_kms.c index 5d8096a17..ca7f90ca8
> > 100644
> > --- a/lib/igt_kms.c
> > +++ b/lib/igt_kms.c
> > @@ -6330,6 +6330,7 @@ int igt_get_max_dotclock(int fd)
> >
> >   /**
> >    * igt_bigjoiner_possible:
> > + * @fd: drm file descriptor
> >    * @mode: libdrm mode
> >    * @max_dotclock: Max pixel clock frequency
> >    *
> > @@ -6338,10 +6339,13 @@ int igt_get_max_dotclock(int fd)
> >    *
> >    * Returns: True if mode requires Bigjoiner, else False.
> >    */
> > -bool igt_bigjoiner_possible(drmModeModeInfo *mode, int max_dotclock)
> > +bool igt_bigjoiner_possible(int fd, drmModeModeInfo *mode, int
> > +max_dotclock)
> >   {
> > -	return (mode->hdisplay > MAX_HDISPLAY_PER_PIPE ||
> > -		mode->clock > max_dotclock);
> > +	int max_hdisplay, dev_id;
> > +	dev_id = intel_get_drm_devid(fd);
> > +	max_hdisplay = (intel_display_ver(dev_id) >= 30) ?
> HDISPLAY_6K_PER_PIPE :
> > +
> HDISPLAY_5K_PER_PIPE;
> > +	return (mode->hdisplay > max_hdisplay || mode->clock >
> > +max_dotclock);
> >   }
> >
> >   /**
> > @@ -6362,10 +6366,10 @@ bool bigjoiner_mode_found(int drm_fd,
> drmModeConnector *connector,
> >   	bool found = false;
> >
> >   	igt_sort_connector_modes(connector, sort_drm_modes_by_res_dsc);
> > -	found = igt_bigjoiner_possible(&connector->modes[0], max_dotclock);
> > +	found = igt_bigjoiner_possible(drm_fd, &connector->modes[0],
> > +max_dotclock);
> >   	if (!found) {
> >   		igt_sort_connector_modes(connector,
> sort_drm_modes_by_clk_dsc);
> > -		found = igt_bigjoiner_possible(&connector->modes[0],
> max_dotclock);
> > +		found = igt_bigjoiner_possible(drm_fd, &connector->modes[0],
> > +max_dotclock);
> >   	}
> >   	if (found)
> >   		*mode = connector->modes[0];
> > @@ -6384,7 +6388,7 @@ bool bigjoiner_mode_found(int drm_fd,
> drmModeConnector *connector,
> >    */
> >   bool igt_ultrajoiner_possible(drmModeModeInfo *mode, int max_dotclock)
> >   {
> > -	return (mode->hdisplay > 2 * MAX_HDISPLAY_PER_PIPE ||
> > +	return (mode->hdisplay > 2 * HDISPLAY_5K_PER_PIPE ||
> >   		mode->clock > 2 * max_dotclock);
> 
> Is there any change in ultra joiner condition?
Yes, Joiner was earlier set for 5k from lnl+ its 6k. 
> 
> >   }
> >
> > @@ -6549,7 +6553,8 @@ bool igt_check_bigjoiner_support(igt_display_t
> *display)
> >   	 *  - current & previous crtcs are consecutive
> >   	 */
> >   	for (i = 0; i < pipes_in_use; i++) {
> > -		if (pipes[i].force_joiner || igt_bigjoiner_possible(pipes[i].mode,
> max_dotclock)) {
> > +		if (pipes[i].force_joiner || igt_bigjoiner_possible(display->drm_fd,
> pipes[i].mode,
> > +		    max_dotclock)) {
> >   			igt_info("pipe-%s-%s: (Max dot-clock: %d KHz), force
> joiner: %s\n",
> >   				 kmstest_pipe_name(pipes[i].idx),
> >   				 igt_output_name(pipes[i].output), @@ -6576,7
> +6581,8 @@ bool
> > igt_check_bigjoiner_support(igt_display_t *display)
> >   			}
> >   		}
> >
> > -		if ((i > 0) && (pipes[i - 1].force_joiner ||
> igt_bigjoiner_possible(pipes[i - 1].mode, max_dotclock))) {
> > +		if ((i > 0) && (pipes[i - 1].force_joiner ||
> igt_bigjoiner_possible(display->drm_fd,
> > +		    pipes[i - 1].mode, max_dotclock))) {
> >   			igt_info("pipe-%s-%s: (Max dot-clock: %d KHz), force
> joiner: %s\n",
> >   				 kmstest_pipe_name(pipes[i - 1].idx),
> >   				 igt_output_name(pipes[i - 1].output), diff --git
> > a/lib/igt_kms.h b/lib/igt_kms.h index bd154d1c1..a1d2b8632 100644
> > --- a/lib/igt_kms.h
> > +++ b/lib/igt_kms.h
> > @@ -146,7 +146,8 @@ const char *kmstest_scaling_filter_str(int filter);
> >   const char *kmstest_dsc_output_format_str(int output_format);
> >
> >   void kmstest_dump_mode(drmModeModeInfo *mode); -#define
> > MAX_HDISPLAY_PER_PIPE 5120
> > +#define HDISPLAY_6K_PER_PIPE 6144
> > +#define HDISPLAY_5K_PER_PIPE 5120
> >
> >   int kmstest_get_pipe_from_crtc_id(int fd, int crtc_id);
> >   void kmstest_set_vt_graphics_mode(void);
> > @@ -1238,7 +1239,7 @@ void igt_sort_connector_modes(drmModeConnector
> *connector,
> >   bool igt_max_bpc_constraint(igt_display_t *display, enum pipe pipe,
> >   		igt_output_t *output, int bpc);
> >   int igt_get_max_dotclock(int fd);
> > -bool igt_bigjoiner_possible(drmModeModeInfo *mode, int max_dotclock);
> > +bool igt_bigjoiner_possible(int fd, drmModeModeInfo *mode, int
> > +max_dotclock);
> >   bool bigjoiner_mode_found(int drm_fd, drmModeConnector *connector,
> >   			  int max_dotclock, drmModeModeInfo *mode);
> >   bool igt_ultrajoiner_possible(drmModeModeInfo *mode, int
> > max_dotclock);


More information about the igt-dev mailing list