Skip to content

Commit

Permalink
libplatsch: pass platsch_ctx to modeset_create_fb
Browse files Browse the repository at this point in the history
Pass the whole contect to the helper function to align it with the code
base. No functional change.

Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
  • Loading branch information
Marco Felsch committed Aug 7, 2024
1 parent c3350a9 commit a5c7b1d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions libplatsch.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,11 +266,12 @@ static int drmprepare_crtc(struct platsch_ctx *ctx, drmModeRes *res,
return -ENOENT;
}

static int modeset_create_fb(int fd, struct modeset_dev *dev)
static int modeset_create_fb(struct platsch_ctx *ctx, struct modeset_dev *dev)
{
struct drm_mode_create_dumb creq;
struct drm_mode_destroy_dumb dreq;
struct drm_mode_map_dumb mreq;
int fd = ctx->drmfd;
int ret;

/* create dumb buffer */
Expand Down Expand Up @@ -490,7 +491,7 @@ static int drmprepare_connector(struct platsch_ctx *ctx, drmModeRes *res,
}

/* create a framebuffer for this CRTC */
ret = modeset_create_fb(ctx->drmfd, dev);
ret = modeset_create_fb(ctx, dev);
if (ret) {
error("cannot create framebuffer for connector #%u\n",
conn->connector_id);
Expand Down

0 comments on commit a5c7b1d

Please sign in to comment.