From: "Ruhl, Michael J" <michael.j.ruhl@intel.com>
To: "Christian König" <ckoenig.leichtzumerken@gmail.com>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"ray.huang@amd.com" <ray.huang@amd.com>,
"airlied@gmail.com" <airlied@gmail.com>,
"daniel@ffwll.ch" <daniel@ffwll.ch>
Subject: RE: [PATCH 3/8] drm/ttm: cleanup ttm_handle_caching_state_failure
Date: Mon, 5 Oct 2020 15:01:50 +0000 [thread overview]
Message-ID: <a9923232e2064cf6b2f14cd93d1d5c1d@intel.com> (raw)
In-Reply-To: <20201001112817.20967-3-christian.koenig@amd.com>
>-----Original Message-----
>From: dri-devel <dri-devel-bounces@lists.freedesktop.org> On Behalf Of
>Christian König
>Sent: Thursday, October 1, 2020 7:28 AM
>To: dri-devel@lists.freedesktop.org; ray.huang@amd.com;
>airlied@gmail.com; daniel@ffwll.ch
>Subject: [PATCH 3/8] drm/ttm: cleanup ttm_handle_caching_state_failure
>
>Remove unused parameters, shorten the function name.
Looks good to me.
Reviewed-by: Michael J. Ruhl <michael.j.ruhl@intel.com>
M
>Signed-off-by: Christian König <christian.koenig@amd.com>
>---
> drivers/gpu/drm/ttm/ttm_page_alloc.c | 20 ++++++++------------
> 1 file changed, 8 insertions(+), 12 deletions(-)
>
>diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c
>b/drivers/gpu/drm/ttm/ttm_page_alloc.c
>index 912c30dcc9db..111031cbb6df 100644
>--- a/drivers/gpu/drm/ttm/ttm_page_alloc.c
>+++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c
>@@ -467,11 +467,11 @@ static int ttm_set_pages_caching(struct page
>**pages,
> * any pages that have changed their caching state already put them to the
> * pool.
> */
>-static void ttm_handle_caching_state_failure(struct list_head *pages,
>- int ttm_flags, enum ttm_caching_state cstate,
>- struct page **failed_pages, unsigned cpages)
>+static void ttm_handle_caching_failure(struct page **failed_pages,
>+ unsigned cpages)
> {
> unsigned i;
>+
> /* Failed pages have to be freed */
> for (i = 0; i < cpages; ++i) {
> list_del(&failed_pages[i]->lru);
>@@ -517,9 +517,8 @@ static int ttm_alloc_new_pages(struct list_head
>*pages, gfp_t gfp_flags,
> r = ttm_set_pages_caching(caching_array,
> cstate, cpages);
> if (r)
>-
> ttm_handle_caching_state_failure(pages,
>- ttm_flags, cstate,
>- caching_array, cpages);
>+
> ttm_handle_caching_failure(caching_array,
>+ cpages);
> }
> r = -ENOMEM;
> goto out;
>@@ -542,9 +541,8 @@ static int ttm_alloc_new_pages(struct list_head
>*pages, gfp_t gfp_flags,
> r = ttm_set_pages_caching(caching_array,
> cstate, cpages);
> if (r) {
>-
> ttm_handle_caching_state_failure(pages,
>- ttm_flags, cstate,
>- caching_array, cpages);
>+
> ttm_handle_caching_failure(caching_array,
>+ cpages);
> goto out;
> }
> cpages = 0;
>@@ -555,9 +553,7 @@ static int ttm_alloc_new_pages(struct list_head
>*pages, gfp_t gfp_flags,
> if (cpages) {
> r = ttm_set_pages_caching(caching_array, cstate, cpages);
> if (r)
>- ttm_handle_caching_state_failure(pages,
>- ttm_flags, cstate,
>- caching_array, cpages);
>+ ttm_handle_caching_failure(caching_array, cpages);
> }
> out:
> kfree(caching_array);
>--
>2.17.1
>
>_______________________________________________
>dri-devel mailing list
>dri-devel@lists.freedesktop.org
>https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2020-10-05 15:08 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-01 11:28 [PATCH 1/8] drm/ttm: remove TTM_PAGE_FLAG_WRITE Christian König
2020-10-01 11:28 ` [PATCH 2/8] drm/ttm: move ttm_set_memory.h out of include Christian König
2020-10-05 15:01 ` Ruhl, Michael J
2020-10-07 8:31 ` Christian König
2020-10-07 11:46 ` Ruhl, Michael J
2020-10-07 12:10 ` Christian König
2020-10-01 11:28 ` [PATCH 3/8] drm/ttm: cleanup ttm_handle_caching_state_failure Christian König
2020-10-05 15:01 ` Ruhl, Michael J [this message]
2020-10-01 11:28 ` [PATCH 4/8] drm/ttm: rename TTM caching enum Christian König
2020-10-05 15:05 ` Ruhl, Michael J
2020-10-07 8:08 ` Christian König
2020-10-01 11:28 ` [PATCH 5/8] drm/ttm: set the tt caching state at creation time Christian König
2020-10-05 15:18 ` Ruhl, Michael J
2020-10-01 11:28 ` [PATCH 6/8] drm/ttm: add caching state to ttm_bus_placement Christian König
2020-10-05 15:39 ` Ruhl, Michael J
2020-10-07 8:59 ` Christian König
2020-10-01 11:28 ` [PATCH 7/8] drm/ttm: use caching instead of placement for ttm_io_prot Christian König
2020-10-05 15:51 ` Ruhl, Michael J
2020-10-07 8:59 ` Christian König
2020-10-01 11:28 ` [PATCH 8/8] drm/ttm: nuke caching placement flags Christian König
2020-10-05 16:17 ` Ruhl, Michael J
2020-10-07 9:07 ` Christian König
2020-10-05 13:29 ` [PATCH 1/8] drm/ttm: remove TTM_PAGE_FLAG_WRITE Christian König
2020-10-05 14:59 ` Ruhl, Michael J
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=a9923232e2064cf6b2f14cd93d1d5c1d@intel.com \
--to=michael.j.ruhl@intel.com \
--cc=airlied@gmail.com \
--cc=ckoenig.leichtzumerken@gmail.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=ray.huang@amd.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.