Skip to content

Commit

Permalink
drm/sun4i: tcon: Copy ID from associated backend
Browse files Browse the repository at this point in the history
The tcons and backends have a one-to-one relationship. Their IDs,
or indexes in the documentation, are also the same.

Copy the ID from the associated backend and save it in the tcon
structure. This will later be used when we add support for the
output data path muxes.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
  • Loading branch information
Chen-Yu Tsai authored and Maxime Ripard committed May 14, 2017
1 parent b317fa3 commit d281c86
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/gpu/drm/sun4i/sun4i_tcon.c
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,7 @@ static int sun4i_tcon_bind(struct device *dev, struct device *master,
dev_set_drvdata(dev, tcon);
tcon->drm = drm;
tcon->dev = dev;
tcon->id = backend->id;
tcon->quirks = of_device_get_match_data(dev);

tcon->lcd_rst = devm_reset_control_get(dev, "lcd");
Expand Down
2 changes: 2 additions & 0 deletions drivers/gpu/drm/sun4i/sun4i_tcon.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ struct sun4i_tcon {
/* Associated crtc */
struct sun4i_crtc *crtc;

int id;

/* TCON list management */
struct list_head list;
};
Expand Down

0 comments on commit d281c86

Please sign in to comment.