Module: Mesa
Branch: main
Commit: 1188b218c61c8f33815e75bc8422cb80e3b468ec
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=1188b218c61c8f33815e75bc8422cb80e3b468ec

Author: Rob Clark <[email protected]>
Date:   Mon Dec 11 13:52:26 2023 -0800

freedreno: Implement PIPE_CAP_TIMER_RESOLUTION

Perhaps it should use div_round_up() unlike normal timestamp conversion,
but this is close enough and it makes the connection to the 19.2MHz RBBM
counter more obvious.

Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26640>

---

 src/gallium/drivers/freedreno/freedreno_screen.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/gallium/drivers/freedreno/freedreno_screen.c 
b/src/gallium/drivers/freedreno/freedreno_screen.c
index f9acfa8f9e7..d04ab107eef 100644
--- a/src/gallium/drivers/freedreno/freedreno_screen.c
+++ b/src/gallium/drivers/freedreno/freedreno_screen.c
@@ -589,6 +589,8 @@ fd_screen_get_param(struct pipe_screen *pscreen, enum 
pipe_cap param)
       /* only a4xx, requires new enough kernel so we know max_freq: */
       return (screen->max_freq > 0) &&
              (is_a4xx(screen) || is_a5xx(screen) || is_a6xx(screen));
+   case PIPE_CAP_TIMER_RESOLUTION:
+      return ticks_to_ns(1);
    case PIPE_CAP_QUERY_BUFFER_OBJECT:
    case PIPE_CAP_QUERY_SO_OVERFLOW:
    case PIPE_CAP_QUERY_PIPELINE_STATISTICS_SINGLE:

Reply via email to