From: "Bommu, Krishnaiah" <krishnaiah.bommu@intel.com>
To: <priyanka.dandamudi@intel.com>, <igt-dev@lists.freedesktop.org>
Subject: Re: [igt-dev] [PATCH i-g-t] xe/xe_mmap: Optimise code to use xe_bo_mmap
Date: Tue, 4 Jul 2023 11:31:11 +0530 [thread overview]
Message-ID: <63f3bd6e-7a02-57b4-9b8c-0c5e4adfbf55@intel.com> (raw)
In-Reply-To: <20230704052717.664717-1-priyanka.dandamudi@intel.com>
[-- Attachment #1: Type: text/plain, Size: 1030 bytes --]
On 04-07-2023 10:57, priyanka.dandamudi@intel.com wrote:
> From: Priyanka Dandamudi<priyanka.dandamudi@intel.com>
>
> Optimise code to use xe_bo_mmap.
>
> Cc: Bommu Krishnaiah<krishnaiah.bommu@intel.com>
> Signed-off-by: Priyanka Dandamudi<priyanka.dandamudi@intel.com>
> ---
> tests/xe/xe_mmap.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/tests/xe/xe_mmap.c b/tests/xe/xe_mmap.c
> index 664ed54fc..7fe8f73a4 100644
> --- a/tests/xe/xe_mmap.c
> +++ b/tests/xe/xe_mmap.c
> @@ -46,11 +46,8 @@ test_mmap(int fd, uint32_t flags)
> igt_require_f(flags, "Device doesn't support such memory region\n");
>
> bo = xe_bo_create_flags(fd, 0, 4096, flags);
> - mmo = xe_bo_mmap_offset(fd, bo);
> -
> - map = mmap(NULL, 4096, PROT_WRITE, MAP_SHARED, fd, mmo);
> - igt_assert(map != MAP_FAILED);
>
> + map = xe_bo_map(fd, bo, 4096);
> strcpy(map, "Write some data to the BO!");
>
> munmap(map, 4096);
Changes looks good to me
Reviewed-by: Bommu Krishnaiah krishnaiah.bommu@intel.com
[-- Attachment #2: Type: text/html, Size: 37418 bytes --]
next prev parent reply other threads:[~2023-07-04 6:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-04 5:27 [igt-dev] [PATCH i-g-t] xe/xe_mmap: Optimise code to use xe_bo_mmap priyanka.dandamudi
2023-07-04 6:01 ` Bommu, Krishnaiah [this message]
2023-07-04 6:30 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2023-07-04 7:33 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
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=63f3bd6e-7a02-57b4-9b8c-0c5e4adfbf55@intel.com \
--to=krishnaiah.bommu@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=priyanka.dandamudi@intel.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