summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Michael <devilhorns@comcast.net>2020-04-28 11:54:07 -0400
committerChristopher Michael <devilhorns@comcast.net>2020-04-28 12:40:53 -0400
commitd0dbc48f1ba8e4a6b725741a3db4a1d67c703a48 (patch)
tree88805cc6dacfaea239d327ce9bff0d79682b1242
parent590d5745a984ab3001f30d97d9573edf7fc2f606 (diff)
ecore-drm2: Change _output_crtc_find to accept an int
There is no reason to be passing the whole device structure here just to get the fd
-rw-r--r--src/lib/ecore_drm2/ecore_drm2_outputs.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/ecore_drm2/ecore_drm2_outputs.c b/src/lib/ecore_drm2/ecore_drm2_outputs.c
index 6fe3eb5770..77123c948a 100644
--- a/src/lib/ecore_drm2/ecore_drm2_outputs.c
+++ b/src/lib/ecore_drm2/ecore_drm2_outputs.c
@@ -250,7 +250,7 @@ _output_edid_find(Ecore_Drm2_Output *output, const drmModeConnector *conn)
250} 250}
251 251
252static int 252static int
253_output_crtc_find(const drmModeRes *res, const drmModeConnector *conn, Ecore_Drm2_Device *dev) 253_output_crtc_find(const drmModeRes *res, const drmModeConnector *conn, int fd)
254{ 254{
255 drmModeEncoder *enc; 255 drmModeEncoder *enc;
256 uint32_t crtc; 256 uint32_t crtc;
@@ -267,7 +267,7 @@ _output_crtc_find(const drmModeRes *res, const drmModeConnector *conn, Ecore_Drm
267 267
268 for (j = 0; j < conn->count_encoders; j++) 268 for (j = 0; j < conn->count_encoders; j++)
269 { 269 {
270 enc = sym_drmModeGetEncoder(dev->fd, conn->encoders[j]); 270 enc = sym_drmModeGetEncoder(fd, conn->encoders[j]);
271 if (!enc) continue; 271 if (!enc) continue;
272 272
273 crtc = enc->crtc_id; 273 crtc = enc->crtc_id;
@@ -678,7 +678,7 @@ _output_create(Ecore_Drm2_Device *dev, const drmModeRes *res, const drmModeConne
678 678
679 if (w) *w = 0; 679 if (w) *w = 0;
680 680
681 i = _output_crtc_find(res, conn, dev); 681 i = _output_crtc_find(res, conn, dev->fd);
682 if (i < 0) return EINA_FALSE; 682 if (i < 0) return EINA_FALSE;
683 683
684 output = calloc(1, sizeof(Ecore_Drm2_Output)); 684 output = calloc(1, sizeof(Ecore_Drm2_Output));