From: Swati Sharma <swati2.sharma@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t] i915/kms_fbcon_fbt: Add crct_id to struct
Date: Fri, 31 Mar 2023 12:44:26 +0530 [thread overview]
Message-ID: <20230331071426.8568-1-swati2.sharma@intel.com> (raw)
Remove hard-coding of PIPE_A while computing CRC.
Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
---
tests/i915/kms_fbcon_fbt.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/tests/i915/kms_fbcon_fbt.c b/tests/i915/kms_fbcon_fbt.c
index 831ec867a..6c557dca7 100644
--- a/tests/i915/kms_fbcon_fbt.c
+++ b/tests/i915/kms_fbcon_fbt.c
@@ -39,7 +39,7 @@ IGT_TEST_DESCRIPTION("Test the relationship between fbcon and the frontbuffer "
#define MAX_CONNECTORS 32
struct drm_info {
- int fd, debugfs_fd;
+ int fd, debugfs_fd, crtc_id;
struct igt_fb fb;
drmModeResPtr res;
drmModeConnectorPtr connectors[MAX_CONNECTORS];
@@ -117,9 +117,10 @@ static bool fbc_check_cursor_blinking(struct drm_info *drm)
igt_pipe_crc_t *pipe_crc;
igt_crc_t crc[2];
bool ret;
- int i;
+ int i, pipe;
- pipe_crc = igt_pipe_crc_new(drm->fd, PIPE_A, IGT_PIPE_CRC_SOURCE_AUTO);
+ pipe = kmstest_get_pipe_from_crtc_id(drm->fd, drm->crtc_id);
+ pipe_crc = igt_pipe_crc_new(drm->fd, pipe, IGT_PIPE_CRC_SOURCE_AUTO);
igt_pipe_crc_start(pipe_crc);
igt_pipe_crc_drain(pipe_crc);
@@ -165,7 +166,6 @@ static void set_mode_for_one_screen(struct drm_info *drm,
connector_possible_fn connector_possible)
{
int i, rc;
- uint32_t crtc_id;
drmModeModeInfoPtr mode;
uint32_t buffer_id;
drmModeConnectorPtr c = NULL;
@@ -182,7 +182,7 @@ static void set_mode_for_one_screen(struct drm_info *drm,
igt_require_f(i < drm->res->count_connectors,
"No connector available\n");
- crtc_id = kmstest_find_crtc_for_connector(drm->fd, drm->res, c, 0);
+ drm->crtc_id = kmstest_find_crtc_for_connector(drm->fd, drm->res, c, 0);
buffer_id = igt_create_fb(drm->fd, mode->hdisplay, mode->vdisplay,
DRM_FORMAT_XRGB8888,
@@ -193,7 +193,7 @@ static void set_mode_for_one_screen(struct drm_info *drm,
mode->hdisplay, mode->vdisplay,
kmstest_connector_type_str(c->connector_type));
- rc = drmModeSetCrtc(drm->fd, crtc_id, buffer_id, 0, 0,
+ rc = drmModeSetCrtc(drm->fd, drm->crtc_id, buffer_id, 0, 0,
&c->connector_id, 1, mode);
igt_assert_eq(rc, 0);
}
--
2.25.1
next reply other threads:[~2023-03-31 7:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-31 7:14 Swati Sharma [this message]
2023-04-06 9:04 ` [igt-dev] [PATCH i-g-t] i915/kms_fbcon_fbt: Add crct_id to struct Kamil Konieczny
2023-05-31 9:21 ` Sharma, Swati2
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=20230331071426.8568-1-swati2.sharma@intel.com \
--to=swati2.sharma@intel.com \
--cc=igt-dev@lists.freedesktop.org \
/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