|
22 | 22 | #include "etnaviv_gem.h"
|
23 | 23 | #include "etnaviv_mmu.h"
|
24 | 24 | #include "etnaviv_perfmon.h"
|
25 |
| -#include "common.xml.h" |
26 | 25 |
|
27 | 26 | /*
|
28 | 27 | * DRM operations:
|
@@ -476,47 +475,7 @@ static const struct drm_ioctl_desc etnaviv_ioctls[] = {
|
476 | 475 | ETNA_IOCTL(PM_QUERY_SIG, pm_query_sig, DRM_RENDER_ALLOW),
|
477 | 476 | };
|
478 | 477 |
|
479 |
| -static void etnaviv_fop_show_fdinfo(struct seq_file *m, struct file *f) |
480 |
| -{ |
481 |
| - struct drm_file *file = f->private_data; |
482 |
| - struct drm_device *dev = file->minor->dev; |
483 |
| - struct etnaviv_drm_private *priv = dev->dev_private; |
484 |
| - struct etnaviv_file_private *ctx = file->driver_priv; |
485 |
| - |
486 |
| - /* |
487 |
| - * For a description of the text output format used here, see |
488 |
| - * Documentation/gpu/drm-usage-stats.rst. |
489 |
| - */ |
490 |
| - seq_printf(m, "drm-driver:\t%s\n", dev->driver->name); |
491 |
| - seq_printf(m, "drm-client-id:\t%u\n", ctx->id); |
492 |
| - |
493 |
| - for (int i = 0; i < ETNA_MAX_PIPES; i++) { |
494 |
| - struct etnaviv_gpu *gpu = priv->gpu[i]; |
495 |
| - char engine[10] = "UNK"; |
496 |
| - int cur = 0; |
497 |
| - |
498 |
| - if (!gpu) |
499 |
| - continue; |
500 |
| - |
501 |
| - if (gpu->identity.features & chipFeatures_PIPE_2D) |
502 |
| - cur = snprintf(engine, sizeof(engine), "2D"); |
503 |
| - if (gpu->identity.features & chipFeatures_PIPE_3D) |
504 |
| - cur = snprintf(engine + cur, sizeof(engine) - cur, |
505 |
| - "%s3D", cur ? "/" : ""); |
506 |
| - if (gpu->identity.nn_core_count > 0) |
507 |
| - cur = snprintf(engine + cur, sizeof(engine) - cur, |
508 |
| - "%sNN", cur ? "/" : ""); |
509 |
| - |
510 |
| - seq_printf(m, "drm-engine-%s:\t%llu ns\n", engine, |
511 |
| - ctx->sched_entity[i].elapsed_ns); |
512 |
| - } |
513 |
| -} |
514 |
| - |
515 |
| -static const struct file_operations fops = { |
516 |
| - .owner = THIS_MODULE, |
517 |
| - DRM_GEM_FOPS, |
518 |
| - .show_fdinfo = etnaviv_fop_show_fdinfo, |
519 |
| -}; |
| 478 | +DEFINE_DRM_GEM_FOPS(fops); |
520 | 479 |
|
521 | 480 | static const struct drm_driver etnaviv_drm_driver = {
|
522 | 481 | .driver_features = DRIVER_GEM | DRIVER_RENDER,
|
|
0 commit comments