Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make functions static and report panel orientation #3

Open
wants to merge 5 commits into
base: adp
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions arch/arm64/boot/dts/apple/t8103-j293.dts
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@
dfr_panel: panel@0 {
compatible = "apple,summit";
reg = <0>;
rotation = <90>;
};
};

Expand Down
1 change: 1 addition & 0 deletions arch/arm64/boot/dts/apple/t8112-j493.dts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
dfr_panel: panel@0 {
compatible = "apple,summit";
reg = <0>;
rotation = <90>;
};
};

Expand Down
13 changes: 10 additions & 3 deletions drivers/gpu/drm/adp/adp_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
#define GEN_RD_CMD_BUSY BIT(6)
#define CMD_PKT_STATUS_TIMEOUT_US 20000

int adp_open(struct inode *inode, struct file *filp)
static int adp_open(struct inode *inode, struct file *filp)
{
/*
* The modesetting driver does not check the non-desktop connector
Expand Down Expand Up @@ -252,7 +252,8 @@ static const u32 plane_formats[] = {

#define ALL_CRTCS 1

struct adp_plane *adp_plane_new(struct adp_drv_private *adp, u8 id)
static struct adp_plane *adp_plane_new(struct adp_drv_private *adp,
u8 id)
{
struct drm_device *drm = &adp->drm;
struct adp_plane *plane;
Expand Down Expand Up @@ -434,7 +435,7 @@ static int adp_get_modes(struct drm_connector *connector)
return 1;
}

int adp_detect_ctx(struct drm_connector *connector,
static int adp_detect_ctx(struct drm_connector *connector,
struct drm_modeset_acquire_ctx *ctx,
bool force) {
connector->display_info.non_desktop = true;
Expand Down Expand Up @@ -512,6 +513,12 @@ static int adp_setup_mode_config(struct adp_drv_private *adp)
if (ret)
return ret;

/* This should come from the dts / panel */
ret = drm_connector_set_panel_orientation(&adp->connector,
DRM_MODE_PANEL_ORIENTATION_RIGHT_UP);
if (ret)
return ret;

drm_connector_attach_encoder(&adp->connector, &adp->encoder);

ret = drm_vblank_init(drm, drm->mode_config.num_crtc);
Expand Down