mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 09:19:51 +00:00
Pull request for drm-misc-fixes-next for v5.3:
- Revert properties exposed in komeda that need improvement before they become ABI. - Only add modes from the cmdline if they are valid. - Add orientation quirk for GPD MicroPC. - Reduce stack usage in drm selftests. - Fix bochs framebuffer setup. -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEuXvWqAysSYEJGuVH/lWMcqZwE8MFAl0oRZYACgkQ/lWMcqZw E8PYHw//YWRRkjWyxQ2NMLDMcRg6GpOKWS7FrDrfycr+dtKvLGvU8+XAwwg97yP+ KXczKDxoQG4cLakn/DsFv9jpZjmROx95U2R5yXFxCp7qu/Pqbeaoo8M7yH422jB2 eEWjoDdmIv89sPr5aOVlT9MHbhOwIId1Ff5wLM6S13D2N+FSxcjKRehGUcZqZUhC RNYH4+v16DqJYlgPbCSQNdYhJxCiL745bsPB+L6O1O9Bekl86+2NjcbL8GauDOag 56y7m4NuoKJRXzqhM3Daq/O3tXBnYYbcl0LMb0Mpgxd/qAauUYkWfWauGCrCgM3q fe2eokmGrrB0AH7q4iicUcosutj2M0KBer24o0vlzGlpsFbndHLN5CLDlfB48qOG Fx4BJTdyHuJFHDaLwzx9flgYRSdjkn+3qkF4J9sjhxraHo/Rtay3kHo8A9mIvclo Vu7Ie2KIbD6g1Xk0M0PR0QgQ+g4Sn2MoCFktSL02L547gY1PtbKoSfqMlmaqw67O gNgAQ8oPkGfbuJa7v73LdRAKUVvFawmZQSuu9ES3PtYrg/NpT/5e2Pvkgy2gVAzE PUgT27d1VDpBHp/kfukpH5zFGV/sWNSsknF9gFLB8YWN8oivzzhEOq4Zsvn0BMy3 y6Y2sUMH2GMO+zYlv5UaTUoFW9lwXFkaJzFN0+ZNdt5j8d5YEOM= =oNyN -----END PGP SIGNATURE----- Merge tag 'drm-misc-next-fixes-2019-07-11' of git://anongit.freedesktop.org/drm/drm-misc into drm-next Pull request for drm-misc-fixes-next for v5.3: - Revert properties exposed in komeda that need improvement before they become ABI. - Only add modes from the cmdline if they are valid. - Add orientation quirk for GPD MicroPC. - Reduce stack usage in drm selftests. - Fix bochs framebuffer setup. Signed-off-by: Dave Airlie <airlied@redhat.com> From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/e6b84ce4-2728-fb02-87c1-6a6b87703c0b@linux.intel.com
This commit is contained in:
commit
b3c8a40cfc
16 changed files with 109 additions and 276 deletions
|
@ -1203,7 +1203,7 @@ M: James (Qian) Wang <james.qian.wang@arm.com>
|
||||||
M: Liviu Dudau <liviu.dudau@arm.com>
|
M: Liviu Dudau <liviu.dudau@arm.com>
|
||||||
L: Mali DP Maintainers <malidp@foss.arm.com>
|
L: Mali DP Maintainers <malidp@foss.arm.com>
|
||||||
S: Supported
|
S: Supported
|
||||||
T: git git://linux-arm.org/linux-ld.git for-upstream/mali-dp
|
T: git git://anongit.freedesktop.org/drm/drm-misc
|
||||||
F: drivers/gpu/drm/arm/display/include/
|
F: drivers/gpu/drm/arm/display/include/
|
||||||
F: drivers/gpu/drm/arm/display/komeda/
|
F: drivers/gpu/drm/arm/display/komeda/
|
||||||
F: Documentation/devicetree/bindings/display/arm,komeda.txt
|
F: Documentation/devicetree/bindings/display/arm,komeda.txt
|
||||||
|
@ -1214,7 +1214,7 @@ M: Liviu Dudau <liviu.dudau@arm.com>
|
||||||
M: Brian Starkey <brian.starkey@arm.com>
|
M: Brian Starkey <brian.starkey@arm.com>
|
||||||
L: Mali DP Maintainers <malidp@foss.arm.com>
|
L: Mali DP Maintainers <malidp@foss.arm.com>
|
||||||
S: Supported
|
S: Supported
|
||||||
T: git git://linux-arm.org/linux-ld.git for-upstream/mali-dp
|
T: git git://anongit.freedesktop.org/drm/drm-misc
|
||||||
F: drivers/gpu/drm/arm/
|
F: drivers/gpu/drm/arm/
|
||||||
F: Documentation/devicetree/bindings/display/arm,malidp.txt
|
F: Documentation/devicetree/bindings/display/arm,malidp.txt
|
||||||
F: Documentation/gpu/afbc.rst
|
F: Documentation/gpu/afbc.rst
|
||||||
|
|
|
@ -454,24 +454,6 @@ static void komeda_crtc_vblank_disable(struct drm_crtc *crtc)
|
||||||
mdev->funcs->on_off_vblank(mdev, kcrtc->master->id, false);
|
mdev->funcs->on_off_vblank(mdev, kcrtc->master->id, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
|
||||||
komeda_crtc_atomic_get_property(struct drm_crtc *crtc,
|
|
||||||
const struct drm_crtc_state *state,
|
|
||||||
struct drm_property *property, uint64_t *val)
|
|
||||||
{
|
|
||||||
struct komeda_crtc *kcrtc = to_kcrtc(crtc);
|
|
||||||
struct komeda_crtc_state *kcrtc_st = to_kcrtc_st(state);
|
|
||||||
|
|
||||||
if (property == kcrtc->clock_ratio_property) {
|
|
||||||
*val = kcrtc_st->clock_ratio;
|
|
||||||
} else {
|
|
||||||
DRM_DEBUG_DRIVER("Unknown property %s\n", property->name);
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static const struct drm_crtc_funcs komeda_crtc_funcs = {
|
static const struct drm_crtc_funcs komeda_crtc_funcs = {
|
||||||
.gamma_set = drm_atomic_helper_legacy_gamma_set,
|
.gamma_set = drm_atomic_helper_legacy_gamma_set,
|
||||||
.destroy = drm_crtc_cleanup,
|
.destroy = drm_crtc_cleanup,
|
||||||
|
@ -482,7 +464,6 @@ static const struct drm_crtc_funcs komeda_crtc_funcs = {
|
||||||
.atomic_destroy_state = komeda_crtc_atomic_destroy_state,
|
.atomic_destroy_state = komeda_crtc_atomic_destroy_state,
|
||||||
.enable_vblank = komeda_crtc_vblank_enable,
|
.enable_vblank = komeda_crtc_vblank_enable,
|
||||||
.disable_vblank = komeda_crtc_vblank_disable,
|
.disable_vblank = komeda_crtc_vblank_disable,
|
||||||
.atomic_get_property = komeda_crtc_atomic_get_property,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
int komeda_kms_setup_crtcs(struct komeda_kms_dev *kms,
|
int komeda_kms_setup_crtcs(struct komeda_kms_dev *kms,
|
||||||
|
@ -518,42 +499,6 @@ int komeda_kms_setup_crtcs(struct komeda_kms_dev *kms,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int komeda_crtc_create_clock_ratio_property(struct komeda_crtc *kcrtc)
|
|
||||||
{
|
|
||||||
struct drm_crtc *crtc = &kcrtc->base;
|
|
||||||
struct drm_property *prop;
|
|
||||||
|
|
||||||
prop = drm_property_create_range(crtc->dev, DRM_MODE_PROP_ATOMIC,
|
|
||||||
"CLOCK_RATIO", 0, U64_MAX);
|
|
||||||
if (!prop)
|
|
||||||
return -ENOMEM;
|
|
||||||
|
|
||||||
drm_object_attach_property(&crtc->base, prop, 0);
|
|
||||||
kcrtc->clock_ratio_property = prop;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int komeda_crtc_create_slave_planes_property(struct komeda_crtc *kcrtc)
|
|
||||||
{
|
|
||||||
struct drm_crtc *crtc = &kcrtc->base;
|
|
||||||
struct drm_property *prop;
|
|
||||||
|
|
||||||
if (kcrtc->slave_planes == 0)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
prop = drm_property_create_range(crtc->dev, DRM_MODE_PROP_IMMUTABLE,
|
|
||||||
"slave_planes", 0, U32_MAX);
|
|
||||||
if (!prop)
|
|
||||||
return -ENOMEM;
|
|
||||||
|
|
||||||
drm_object_attach_property(&crtc->base, prop, kcrtc->slave_planes);
|
|
||||||
|
|
||||||
kcrtc->slave_planes_property = prop;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct drm_plane *
|
static struct drm_plane *
|
||||||
get_crtc_primary(struct komeda_kms_dev *kms, struct komeda_crtc *crtc)
|
get_crtc_primary(struct komeda_kms_dev *kms, struct komeda_crtc *crtc)
|
||||||
{
|
{
|
||||||
|
@ -590,14 +535,6 @@ static int komeda_crtc_add(struct komeda_kms_dev *kms,
|
||||||
|
|
||||||
crtc->port = kcrtc->master->of_output_port;
|
crtc->port = kcrtc->master->of_output_port;
|
||||||
|
|
||||||
err = komeda_crtc_create_clock_ratio_property(kcrtc);
|
|
||||||
if (err)
|
|
||||||
return err;
|
|
||||||
|
|
||||||
err = komeda_crtc_create_slave_planes_property(kcrtc);
|
|
||||||
if (err)
|
|
||||||
return err;
|
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,11 +33,6 @@ struct komeda_plane {
|
||||||
* Layers with same capabilities.
|
* Layers with same capabilities.
|
||||||
*/
|
*/
|
||||||
struct komeda_layer *layer;
|
struct komeda_layer *layer;
|
||||||
|
|
||||||
/** @prop_img_enhancement: for on/off image enhancement */
|
|
||||||
struct drm_property *prop_img_enhancement;
|
|
||||||
/** @prop_layer_split: for on/off layer_split */
|
|
||||||
struct drm_property *prop_layer_split;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -52,11 +47,8 @@ struct komeda_plane_state {
|
||||||
/** @zlist_node: zorder list node */
|
/** @zlist_node: zorder list node */
|
||||||
struct list_head zlist_node;
|
struct list_head zlist_node;
|
||||||
|
|
||||||
/* @img_enhancement: on/off image enhancement
|
/** @layer_split: on/off layer_split */
|
||||||
* @layer_split: on/off layer_split
|
u8 layer_split : 1;
|
||||||
*/
|
|
||||||
u8 img_enhancement : 1,
|
|
||||||
layer_split : 1;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -94,12 +86,6 @@ struct komeda_crtc {
|
||||||
|
|
||||||
/** @disable_done: this flip_done is for tracing the disable */
|
/** @disable_done: this flip_done is for tracing the disable */
|
||||||
struct completion *disable_done;
|
struct completion *disable_done;
|
||||||
|
|
||||||
/** @clock_ratio_property: property for ratio of (aclk << 32)/pxlclk */
|
|
||||||
struct drm_property *clock_ratio_property;
|
|
||||||
|
|
||||||
/** @slave_planes_property: property for slaves of the planes */
|
|
||||||
struct drm_property *slave_planes_property;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -537,7 +537,8 @@ void komeda_pipeline_disable(struct komeda_pipeline *pipe,
|
||||||
void komeda_pipeline_update(struct komeda_pipeline *pipe,
|
void komeda_pipeline_update(struct komeda_pipeline *pipe,
|
||||||
struct drm_atomic_state *old_state);
|
struct drm_atomic_state *old_state);
|
||||||
|
|
||||||
void komeda_complete_data_flow_cfg(struct komeda_data_flow_cfg *dflow,
|
void komeda_complete_data_flow_cfg(struct komeda_layer *layer,
|
||||||
|
struct komeda_data_flow_cfg *dflow,
|
||||||
struct drm_framebuffer *fb);
|
struct drm_framebuffer *fb);
|
||||||
|
|
||||||
#endif /* _KOMEDA_PIPELINE_H_*/
|
#endif /* _KOMEDA_PIPELINE_H_*/
|
||||||
|
|
|
@ -784,9 +784,11 @@ komeda_timing_ctrlr_validate(struct komeda_timing_ctrlr *ctrlr,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void komeda_complete_data_flow_cfg(struct komeda_data_flow_cfg *dflow,
|
void komeda_complete_data_flow_cfg(struct komeda_layer *layer,
|
||||||
|
struct komeda_data_flow_cfg *dflow,
|
||||||
struct drm_framebuffer *fb)
|
struct drm_framebuffer *fb)
|
||||||
{
|
{
|
||||||
|
struct komeda_scaler *scaler = layer->base.pipeline->scalers[0];
|
||||||
u32 w = dflow->in_w;
|
u32 w = dflow->in_w;
|
||||||
u32 h = dflow->in_h;
|
u32 h = dflow->in_h;
|
||||||
|
|
||||||
|
@ -803,6 +805,17 @@ void komeda_complete_data_flow_cfg(struct komeda_data_flow_cfg *dflow,
|
||||||
|
|
||||||
dflow->en_scaling = (w != dflow->out_w) || (h != dflow->out_h);
|
dflow->en_scaling = (w != dflow->out_w) || (h != dflow->out_h);
|
||||||
dflow->is_yuv = fb->format->is_yuv;
|
dflow->is_yuv = fb->format->is_yuv;
|
||||||
|
|
||||||
|
/* try to enable image enhancer if data flow is a 2x+ upscaling */
|
||||||
|
dflow->en_img_enhancement = dflow->out_w >= 2 * w ||
|
||||||
|
dflow->out_h >= 2 * h;
|
||||||
|
|
||||||
|
/* try to enable split if scaling exceed the scaler's acceptable
|
||||||
|
* input/output range.
|
||||||
|
*/
|
||||||
|
if (dflow->en_scaling && scaler)
|
||||||
|
dflow->en_split = !in_range(&scaler->hsize, dflow->in_w) ||
|
||||||
|
!in_range(&scaler->hsize, dflow->out_w);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool merger_is_available(struct komeda_pipeline *pipe,
|
static bool merger_is_available(struct komeda_pipeline *pipe,
|
||||||
|
|
|
@ -18,7 +18,6 @@ komeda_plane_init_data_flow(struct drm_plane_state *st,
|
||||||
struct komeda_data_flow_cfg *dflow)
|
struct komeda_data_flow_cfg *dflow)
|
||||||
{
|
{
|
||||||
struct komeda_plane *kplane = to_kplane(st->plane);
|
struct komeda_plane *kplane = to_kplane(st->plane);
|
||||||
struct komeda_plane_state *kplane_st = to_kplane_st(st);
|
|
||||||
struct drm_framebuffer *fb = st->fb;
|
struct drm_framebuffer *fb = st->fb;
|
||||||
const struct komeda_format_caps *caps = to_kfb(fb)->format_caps;
|
const struct komeda_format_caps *caps = to_kfb(fb)->format_caps;
|
||||||
struct komeda_pipeline *pipe = kplane->layer->base.pipeline;
|
struct komeda_pipeline *pipe = kplane->layer->base.pipeline;
|
||||||
|
@ -57,10 +56,7 @@ komeda_plane_init_data_flow(struct drm_plane_state *st,
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
dflow->en_img_enhancement = !!kplane_st->img_enhancement;
|
komeda_complete_data_flow_cfg(kplane->layer, dflow, fb);
|
||||||
dflow->en_split = !!kplane_st->layer_split;
|
|
||||||
|
|
||||||
komeda_complete_data_flow_cfg(dflow, fb);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -175,8 +171,6 @@ komeda_plane_atomic_duplicate_state(struct drm_plane *plane)
|
||||||
|
|
||||||
old = to_kplane_st(plane->state);
|
old = to_kplane_st(plane->state);
|
||||||
|
|
||||||
new->img_enhancement = old->img_enhancement;
|
|
||||||
|
|
||||||
return &new->base;
|
return &new->base;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -188,44 +182,6 @@ komeda_plane_atomic_destroy_state(struct drm_plane *plane,
|
||||||
kfree(to_kplane_st(state));
|
kfree(to_kplane_st(state));
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
|
||||||
komeda_plane_atomic_get_property(struct drm_plane *plane,
|
|
||||||
const struct drm_plane_state *state,
|
|
||||||
struct drm_property *property,
|
|
||||||
uint64_t *val)
|
|
||||||
{
|
|
||||||
struct komeda_plane *kplane = to_kplane(plane);
|
|
||||||
struct komeda_plane_state *st = to_kplane_st(state);
|
|
||||||
|
|
||||||
if (property == kplane->prop_img_enhancement)
|
|
||||||
*val = st->img_enhancement;
|
|
||||||
else if (property == kplane->prop_layer_split)
|
|
||||||
*val = st->layer_split;
|
|
||||||
else
|
|
||||||
return -EINVAL;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
|
||||||
komeda_plane_atomic_set_property(struct drm_plane *plane,
|
|
||||||
struct drm_plane_state *state,
|
|
||||||
struct drm_property *property,
|
|
||||||
uint64_t val)
|
|
||||||
{
|
|
||||||
struct komeda_plane *kplane = to_kplane(plane);
|
|
||||||
struct komeda_plane_state *st = to_kplane_st(state);
|
|
||||||
|
|
||||||
if (property == kplane->prop_img_enhancement)
|
|
||||||
st->img_enhancement = !!val;
|
|
||||||
else if (property == kplane->prop_layer_split)
|
|
||||||
st->layer_split = !!val;
|
|
||||||
else
|
|
||||||
return -EINVAL;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
komeda_plane_format_mod_supported(struct drm_plane *plane,
|
komeda_plane_format_mod_supported(struct drm_plane *plane,
|
||||||
u32 format, u64 modifier)
|
u32 format, u64 modifier)
|
||||||
|
@ -245,43 +201,9 @@ static const struct drm_plane_funcs komeda_plane_funcs = {
|
||||||
.reset = komeda_plane_reset,
|
.reset = komeda_plane_reset,
|
||||||
.atomic_duplicate_state = komeda_plane_atomic_duplicate_state,
|
.atomic_duplicate_state = komeda_plane_atomic_duplicate_state,
|
||||||
.atomic_destroy_state = komeda_plane_atomic_destroy_state,
|
.atomic_destroy_state = komeda_plane_atomic_destroy_state,
|
||||||
.atomic_get_property = komeda_plane_atomic_get_property,
|
|
||||||
.atomic_set_property = komeda_plane_atomic_set_property,
|
|
||||||
.format_mod_supported = komeda_plane_format_mod_supported,
|
.format_mod_supported = komeda_plane_format_mod_supported,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int
|
|
||||||
komeda_plane_create_layer_properties(struct komeda_plane *kplane,
|
|
||||||
struct komeda_layer *layer)
|
|
||||||
{
|
|
||||||
struct drm_device *drm = kplane->base.dev;
|
|
||||||
struct drm_plane *plane = &kplane->base;
|
|
||||||
struct drm_property *prop = NULL;
|
|
||||||
|
|
||||||
/* property: layer image_enhancement */
|
|
||||||
if (layer->base.supported_outputs & KOMEDA_PIPELINE_SCALERS) {
|
|
||||||
prop = drm_property_create_bool(drm, DRM_MODE_PROP_ATOMIC,
|
|
||||||
"img_enhancement");
|
|
||||||
if (!prop)
|
|
||||||
return -ENOMEM;
|
|
||||||
|
|
||||||
drm_object_attach_property(&plane->base, prop, 0);
|
|
||||||
kplane->prop_img_enhancement = prop;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* property: layer split */
|
|
||||||
if (layer->right) {
|
|
||||||
prop = drm_property_create_bool(drm, DRM_MODE_PROP_ATOMIC,
|
|
||||||
"layer_split");
|
|
||||||
if (!prop)
|
|
||||||
return -ENOMEM;
|
|
||||||
kplane->prop_layer_split = prop;
|
|
||||||
drm_object_attach_property(&plane->base, prop, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* for komeda, which is pipeline can be share between crtcs */
|
/* for komeda, which is pipeline can be share between crtcs */
|
||||||
static u32 get_possible_crtcs(struct komeda_kms_dev *kms,
|
static u32 get_possible_crtcs(struct komeda_kms_dev *kms,
|
||||||
struct komeda_pipeline *pipe)
|
struct komeda_pipeline *pipe)
|
||||||
|
@ -375,10 +297,6 @@ static int komeda_plane_add(struct komeda_kms_dev *kms,
|
||||||
if (err)
|
if (err)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
err = komeda_plane_create_layer_properties(kplane, layer);
|
|
||||||
if (err)
|
|
||||||
goto cleanup;
|
|
||||||
|
|
||||||
err = drm_plane_create_color_properties(plane,
|
err = drm_plane_create_color_properties(plane,
|
||||||
BIT(DRM_COLOR_YCBCR_BT601) |
|
BIT(DRM_COLOR_YCBCR_BT601) |
|
||||||
BIT(DRM_COLOR_YCBCR_BT709) |
|
BIT(DRM_COLOR_YCBCR_BT709) |
|
||||||
|
|
|
@ -13,7 +13,6 @@ komeda_wb_init_data_flow(struct komeda_layer *wb_layer,
|
||||||
struct komeda_crtc_state *kcrtc_st,
|
struct komeda_crtc_state *kcrtc_st,
|
||||||
struct komeda_data_flow_cfg *dflow)
|
struct komeda_data_flow_cfg *dflow)
|
||||||
{
|
{
|
||||||
struct komeda_scaler *scaler = wb_layer->base.pipeline->scalers[0];
|
|
||||||
struct drm_framebuffer *fb = conn_st->writeback_job->fb;
|
struct drm_framebuffer *fb = conn_st->writeback_job->fb;
|
||||||
|
|
||||||
memset(dflow, 0, sizeof(*dflow));
|
memset(dflow, 0, sizeof(*dflow));
|
||||||
|
@ -28,14 +27,7 @@ komeda_wb_init_data_flow(struct komeda_layer *wb_layer,
|
||||||
dflow->pixel_blend_mode = DRM_MODE_BLEND_PIXEL_NONE;
|
dflow->pixel_blend_mode = DRM_MODE_BLEND_PIXEL_NONE;
|
||||||
dflow->rot = DRM_MODE_ROTATE_0;
|
dflow->rot = DRM_MODE_ROTATE_0;
|
||||||
|
|
||||||
komeda_complete_data_flow_cfg(dflow, fb);
|
komeda_complete_data_flow_cfg(wb_layer, dflow, fb);
|
||||||
|
|
||||||
/* if scaling exceed the acceptable scaler input/output range, try to
|
|
||||||
* enable split.
|
|
||||||
*/
|
|
||||||
if (dflow->en_scaling && scaler)
|
|
||||||
dflow->en_split = !in_range(&scaler->hsize, dflow->in_w) ||
|
|
||||||
!in_range(&scaler->hsize, dflow->out_w);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,7 +86,7 @@ void bochs_hw_setmode(struct bochs_device *bochs,
|
||||||
void bochs_hw_setformat(struct bochs_device *bochs,
|
void bochs_hw_setformat(struct bochs_device *bochs,
|
||||||
const struct drm_format_info *format);
|
const struct drm_format_info *format);
|
||||||
void bochs_hw_setbase(struct bochs_device *bochs,
|
void bochs_hw_setbase(struct bochs_device *bochs,
|
||||||
int x, int y, u64 addr);
|
int x, int y, int stride, u64 addr);
|
||||||
int bochs_hw_load_edid(struct bochs_device *bochs);
|
int bochs_hw_load_edid(struct bochs_device *bochs);
|
||||||
|
|
||||||
/* bochs_mm.c */
|
/* bochs_mm.c */
|
||||||
|
|
|
@ -255,16 +255,22 @@ void bochs_hw_setformat(struct bochs_device *bochs,
|
||||||
}
|
}
|
||||||
|
|
||||||
void bochs_hw_setbase(struct bochs_device *bochs,
|
void bochs_hw_setbase(struct bochs_device *bochs,
|
||||||
int x, int y, u64 addr)
|
int x, int y, int stride, u64 addr)
|
||||||
{
|
{
|
||||||
unsigned long offset = (unsigned long)addr +
|
unsigned long offset;
|
||||||
|
unsigned int vx, vy, vwidth;
|
||||||
|
|
||||||
|
bochs->stride = stride;
|
||||||
|
offset = (unsigned long)addr +
|
||||||
y * bochs->stride +
|
y * bochs->stride +
|
||||||
x * (bochs->bpp / 8);
|
x * (bochs->bpp / 8);
|
||||||
int vy = offset / bochs->stride;
|
vy = offset / bochs->stride;
|
||||||
int vx = (offset % bochs->stride) * 8 / bochs->bpp;
|
vx = (offset % bochs->stride) * 8 / bochs->bpp;
|
||||||
|
vwidth = stride * 8 / bochs->bpp;
|
||||||
|
|
||||||
DRM_DEBUG_DRIVER("x %d, y %d, addr %llx -> offset %lx, vx %d, vy %d\n",
|
DRM_DEBUG_DRIVER("x %d, y %d, addr %llx -> offset %lx, vx %d, vy %d\n",
|
||||||
x, y, addr, offset, vx, vy);
|
x, y, addr, offset, vx, vy);
|
||||||
|
bochs_dispi_write(bochs, VBE_DISPI_INDEX_VIRT_WIDTH, vwidth);
|
||||||
bochs_dispi_write(bochs, VBE_DISPI_INDEX_X_OFFSET, vx);
|
bochs_dispi_write(bochs, VBE_DISPI_INDEX_X_OFFSET, vx);
|
||||||
bochs_dispi_write(bochs, VBE_DISPI_INDEX_Y_OFFSET, vy);
|
bochs_dispi_write(bochs, VBE_DISPI_INDEX_Y_OFFSET, vy);
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,8 @@ static void bochs_plane_update(struct bochs_device *bochs,
|
||||||
bochs_hw_setbase(bochs,
|
bochs_hw_setbase(bochs,
|
||||||
state->crtc_x,
|
state->crtc_x,
|
||||||
state->crtc_y,
|
state->crtc_y,
|
||||||
gbo->bo.offset);
|
state->fb->pitches[0],
|
||||||
|
state->fb->offsets[0] + gbo->bo.offset);
|
||||||
bochs_hw_setformat(bochs, state->fb->format);
|
bochs_hw_setformat(bochs, state->fb->format);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -180,7 +180,8 @@ drm_connector_pick_cmdline_mode(struct drm_connector *connector)
|
||||||
|
|
||||||
create_mode:
|
create_mode:
|
||||||
mode = drm_mode_create_from_cmdline_mode(connector->dev, cmdline_mode);
|
mode = drm_mode_create_from_cmdline_mode(connector->dev, cmdline_mode);
|
||||||
list_add(&mode->head, &connector->modes);
|
if (mode)
|
||||||
|
list_add(&mode->head, &connector->modes);
|
||||||
|
|
||||||
return mode;
|
return mode;
|
||||||
}
|
}
|
||||||
|
|
|
@ -141,7 +141,7 @@ static void drm_connector_get_cmdline_mode(struct drm_connector *connector)
|
||||||
|
|
||||||
DRM_DEBUG_KMS("cmdline mode for connector %s %s %dx%d@%dHz%s%s%s\n",
|
DRM_DEBUG_KMS("cmdline mode for connector %s %s %dx%d@%dHz%s%s%s\n",
|
||||||
connector->name,
|
connector->name,
|
||||||
mode->name ? mode->name : "",
|
mode->name,
|
||||||
mode->xres, mode->yres,
|
mode->xres, mode->yres,
|
||||||
mode->refresh_specified ? mode->refresh : 60,
|
mode->refresh_specified ? mode->refresh : 60,
|
||||||
mode->rb ? " reduced blanking" : "",
|
mode->rb ? " reduced blanking" : "",
|
||||||
|
|
|
@ -158,6 +158,9 @@ struct drm_display_mode *drm_cvt_mode(struct drm_device *dev, int hdisplay,
|
||||||
int interlace;
|
int interlace;
|
||||||
u64 tmp;
|
u64 tmp;
|
||||||
|
|
||||||
|
if (!hdisplay || !vdisplay)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
/* allocate the drm_display_mode structure. If failure, we will
|
/* allocate the drm_display_mode structure. If failure, we will
|
||||||
* return directly
|
* return directly
|
||||||
*/
|
*/
|
||||||
|
@ -392,6 +395,9 @@ drm_gtf_mode_complex(struct drm_device *dev, int hdisplay, int vdisplay,
|
||||||
int hsync, hfront_porch, vodd_front_porch_lines;
|
int hsync, hfront_porch, vodd_front_porch_lines;
|
||||||
unsigned int tmp1, tmp2;
|
unsigned int tmp1, tmp2;
|
||||||
|
|
||||||
|
if (!hdisplay || !vdisplay)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
drm_mode = drm_mode_create(dev);
|
drm_mode = drm_mode_create(dev);
|
||||||
if (!drm_mode)
|
if (!drm_mode)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -1448,7 +1454,7 @@ static int drm_mode_parse_cmdline_refresh(const char *str, char **end_ptr,
|
||||||
}
|
}
|
||||||
|
|
||||||
static int drm_mode_parse_cmdline_extra(const char *str, int length,
|
static int drm_mode_parse_cmdline_extra(const char *str, int length,
|
||||||
struct drm_connector *connector,
|
const struct drm_connector *connector,
|
||||||
struct drm_cmdline_mode *mode)
|
struct drm_cmdline_mode *mode)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
@ -1493,7 +1499,7 @@ static int drm_mode_parse_cmdline_extra(const char *str, int length,
|
||||||
|
|
||||||
static int drm_mode_parse_cmdline_res_mode(const char *str, unsigned int length,
|
static int drm_mode_parse_cmdline_res_mode(const char *str, unsigned int length,
|
||||||
bool extras,
|
bool extras,
|
||||||
struct drm_connector *connector,
|
const struct drm_connector *connector,
|
||||||
struct drm_cmdline_mode *mode)
|
struct drm_cmdline_mode *mode)
|
||||||
{
|
{
|
||||||
const char *str_start = str;
|
const char *str_start = str;
|
||||||
|
@ -1555,7 +1561,7 @@ static int drm_mode_parse_cmdline_res_mode(const char *str, unsigned int length,
|
||||||
}
|
}
|
||||||
|
|
||||||
static int drm_mode_parse_cmdline_options(char *str, size_t len,
|
static int drm_mode_parse_cmdline_options(char *str, size_t len,
|
||||||
struct drm_connector *connector,
|
const struct drm_connector *connector,
|
||||||
struct drm_cmdline_mode *mode)
|
struct drm_cmdline_mode *mode)
|
||||||
{
|
{
|
||||||
unsigned int rotation = 0;
|
unsigned int rotation = 0;
|
||||||
|
@ -1689,7 +1695,7 @@ static int drm_mode_parse_cmdline_options(char *str, size_t len,
|
||||||
* True if a valid modeline has been parsed, false otherwise.
|
* True if a valid modeline has been parsed, false otherwise.
|
||||||
*/
|
*/
|
||||||
bool drm_mode_parse_command_line_for_connector(const char *mode_option,
|
bool drm_mode_parse_command_line_for_connector(const char *mode_option,
|
||||||
struct drm_connector *connector,
|
const struct drm_connector *connector,
|
||||||
struct drm_cmdline_mode *mode)
|
struct drm_cmdline_mode *mode)
|
||||||
{
|
{
|
||||||
const char *name;
|
const char *name;
|
||||||
|
|
|
@ -90,6 +90,12 @@ static const struct drm_dmi_panel_orientation_data itworks_tw891 = {
|
||||||
.orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP,
|
.orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const struct drm_dmi_panel_orientation_data lcd720x1280_rightside_up = {
|
||||||
|
.width = 720,
|
||||||
|
.height = 1280,
|
||||||
|
.orientation = DRM_MODE_PANEL_ORIENTATION_RIGHT_UP,
|
||||||
|
};
|
||||||
|
|
||||||
static const struct drm_dmi_panel_orientation_data lcd800x1280_rightside_up = {
|
static const struct drm_dmi_panel_orientation_data lcd800x1280_rightside_up = {
|
||||||
.width = 800,
|
.width = 800,
|
||||||
.height = 1280,
|
.height = 1280,
|
||||||
|
@ -123,6 +129,12 @@ static const struct dmi_system_id orientation_data[] = {
|
||||||
DMI_EXACT_MATCH(DMI_BOARD_NAME, "Default string"),
|
DMI_EXACT_MATCH(DMI_BOARD_NAME, "Default string"),
|
||||||
},
|
},
|
||||||
.driver_data = (void *)&gpd_micropc,
|
.driver_data = (void *)&gpd_micropc,
|
||||||
|
}, { /* GPD MicroPC (later BIOS versions with proper DMI strings) */
|
||||||
|
.matches = {
|
||||||
|
DMI_EXACT_MATCH(DMI_SYS_VENDOR, "GPD"),
|
||||||
|
DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "MicroPC"),
|
||||||
|
},
|
||||||
|
.driver_data = (void *)&lcd720x1280_rightside_up,
|
||||||
}, { /*
|
}, { /*
|
||||||
* GPD Pocket, note that the the DMI data is less generic then
|
* GPD Pocket, note that the the DMI data is less generic then
|
||||||
* it seems, devices with a board-vendor of "AMI Corporation"
|
* it seems, devices with a board-vendor of "AMI Corporation"
|
||||||
|
|
|
@ -15,13 +15,14 @@
|
||||||
#include "drm_selftest.h"
|
#include "drm_selftest.h"
|
||||||
#include "test-drm_modeset_common.h"
|
#include "test-drm_modeset_common.h"
|
||||||
|
|
||||||
|
static const struct drm_connector no_connector = {};
|
||||||
|
|
||||||
static int drm_cmdline_test_res(void *ignored)
|
static int drm_cmdline_test_res(void *ignored)
|
||||||
{
|
{
|
||||||
struct drm_connector connector = { };
|
|
||||||
struct drm_cmdline_mode mode = { };
|
struct drm_cmdline_mode mode = { };
|
||||||
|
|
||||||
FAIL_ON(!drm_mode_parse_command_line_for_connector("720x480",
|
FAIL_ON(!drm_mode_parse_command_line_for_connector("720x480",
|
||||||
&connector,
|
&no_connector,
|
||||||
&mode));
|
&mode));
|
||||||
FAIL_ON(!mode.specified);
|
FAIL_ON(!mode.specified);
|
||||||
FAIL_ON(mode.xres != 720);
|
FAIL_ON(mode.xres != 720);
|
||||||
|
@ -42,11 +43,10 @@ static int drm_cmdline_test_res(void *ignored)
|
||||||
|
|
||||||
static int drm_cmdline_test_res_missing_x(void *ignored)
|
static int drm_cmdline_test_res_missing_x(void *ignored)
|
||||||
{
|
{
|
||||||
struct drm_connector connector = { };
|
|
||||||
struct drm_cmdline_mode mode = { };
|
struct drm_cmdline_mode mode = { };
|
||||||
|
|
||||||
FAIL_ON(drm_mode_parse_command_line_for_connector("x480",
|
FAIL_ON(drm_mode_parse_command_line_for_connector("x480",
|
||||||
&connector,
|
&no_connector,
|
||||||
&mode));
|
&mode));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -54,11 +54,10 @@ static int drm_cmdline_test_res_missing_x(void *ignored)
|
||||||
|
|
||||||
static int drm_cmdline_test_res_missing_y(void *ignored)
|
static int drm_cmdline_test_res_missing_y(void *ignored)
|
||||||
{
|
{
|
||||||
struct drm_connector connector = { };
|
|
||||||
struct drm_cmdline_mode mode = { };
|
struct drm_cmdline_mode mode = { };
|
||||||
|
|
||||||
FAIL_ON(drm_mode_parse_command_line_for_connector("1024x",
|
FAIL_ON(drm_mode_parse_command_line_for_connector("1024x",
|
||||||
&connector,
|
&no_connector,
|
||||||
&mode));
|
&mode));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -66,11 +65,10 @@ static int drm_cmdline_test_res_missing_y(void *ignored)
|
||||||
|
|
||||||
static int drm_cmdline_test_res_bad_y(void *ignored)
|
static int drm_cmdline_test_res_bad_y(void *ignored)
|
||||||
{
|
{
|
||||||
struct drm_connector connector = { };
|
|
||||||
struct drm_cmdline_mode mode = { };
|
struct drm_cmdline_mode mode = { };
|
||||||
|
|
||||||
FAIL_ON(drm_mode_parse_command_line_for_connector("1024xtest",
|
FAIL_ON(drm_mode_parse_command_line_for_connector("1024xtest",
|
||||||
&connector,
|
&no_connector,
|
||||||
&mode));
|
&mode));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -78,11 +76,10 @@ static int drm_cmdline_test_res_bad_y(void *ignored)
|
||||||
|
|
||||||
static int drm_cmdline_test_res_missing_y_bpp(void *ignored)
|
static int drm_cmdline_test_res_missing_y_bpp(void *ignored)
|
||||||
{
|
{
|
||||||
struct drm_connector connector = { };
|
|
||||||
struct drm_cmdline_mode mode = { };
|
struct drm_cmdline_mode mode = { };
|
||||||
|
|
||||||
FAIL_ON(drm_mode_parse_command_line_for_connector("1024x-24",
|
FAIL_ON(drm_mode_parse_command_line_for_connector("1024x-24",
|
||||||
&connector,
|
&no_connector,
|
||||||
&mode));
|
&mode));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -90,11 +87,10 @@ static int drm_cmdline_test_res_missing_y_bpp(void *ignored)
|
||||||
|
|
||||||
static int drm_cmdline_test_res_vesa(void *ignored)
|
static int drm_cmdline_test_res_vesa(void *ignored)
|
||||||
{
|
{
|
||||||
struct drm_connector connector = { };
|
|
||||||
struct drm_cmdline_mode mode = { };
|
struct drm_cmdline_mode mode = { };
|
||||||
|
|
||||||
FAIL_ON(!drm_mode_parse_command_line_for_connector("720x480M",
|
FAIL_ON(!drm_mode_parse_command_line_for_connector("720x480M",
|
||||||
&connector,
|
&no_connector,
|
||||||
&mode));
|
&mode));
|
||||||
FAIL_ON(!mode.specified);
|
FAIL_ON(!mode.specified);
|
||||||
FAIL_ON(mode.xres != 720);
|
FAIL_ON(mode.xres != 720);
|
||||||
|
@ -115,11 +111,10 @@ static int drm_cmdline_test_res_vesa(void *ignored)
|
||||||
|
|
||||||
static int drm_cmdline_test_res_vesa_rblank(void *ignored)
|
static int drm_cmdline_test_res_vesa_rblank(void *ignored)
|
||||||
{
|
{
|
||||||
struct drm_connector connector = { };
|
|
||||||
struct drm_cmdline_mode mode = { };
|
struct drm_cmdline_mode mode = { };
|
||||||
|
|
||||||
FAIL_ON(!drm_mode_parse_command_line_for_connector("720x480MR",
|
FAIL_ON(!drm_mode_parse_command_line_for_connector("720x480MR",
|
||||||
&connector,
|
&no_connector,
|
||||||
&mode));
|
&mode));
|
||||||
FAIL_ON(!mode.specified);
|
FAIL_ON(!mode.specified);
|
||||||
FAIL_ON(mode.xres != 720);
|
FAIL_ON(mode.xres != 720);
|
||||||
|
@ -140,11 +135,10 @@ static int drm_cmdline_test_res_vesa_rblank(void *ignored)
|
||||||
|
|
||||||
static int drm_cmdline_test_res_rblank(void *ignored)
|
static int drm_cmdline_test_res_rblank(void *ignored)
|
||||||
{
|
{
|
||||||
struct drm_connector connector = { };
|
|
||||||
struct drm_cmdline_mode mode = { };
|
struct drm_cmdline_mode mode = { };
|
||||||
|
|
||||||
FAIL_ON(!drm_mode_parse_command_line_for_connector("720x480R",
|
FAIL_ON(!drm_mode_parse_command_line_for_connector("720x480R",
|
||||||
&connector,
|
&no_connector,
|
||||||
&mode));
|
&mode));
|
||||||
FAIL_ON(!mode.specified);
|
FAIL_ON(!mode.specified);
|
||||||
FAIL_ON(mode.xres != 720);
|
FAIL_ON(mode.xres != 720);
|
||||||
|
@ -165,11 +159,10 @@ static int drm_cmdline_test_res_rblank(void *ignored)
|
||||||
|
|
||||||
static int drm_cmdline_test_res_bpp(void *ignored)
|
static int drm_cmdline_test_res_bpp(void *ignored)
|
||||||
{
|
{
|
||||||
struct drm_connector connector = { };
|
|
||||||
struct drm_cmdline_mode mode = { };
|
struct drm_cmdline_mode mode = { };
|
||||||
|
|
||||||
FAIL_ON(!drm_mode_parse_command_line_for_connector("720x480-24",
|
FAIL_ON(!drm_mode_parse_command_line_for_connector("720x480-24",
|
||||||
&connector,
|
&no_connector,
|
||||||
&mode));
|
&mode));
|
||||||
FAIL_ON(!mode.specified);
|
FAIL_ON(!mode.specified);
|
||||||
FAIL_ON(mode.xres != 720);
|
FAIL_ON(mode.xres != 720);
|
||||||
|
@ -191,11 +184,10 @@ static int drm_cmdline_test_res_bpp(void *ignored)
|
||||||
|
|
||||||
static int drm_cmdline_test_res_bad_bpp(void *ignored)
|
static int drm_cmdline_test_res_bad_bpp(void *ignored)
|
||||||
{
|
{
|
||||||
struct drm_connector connector = { };
|
|
||||||
struct drm_cmdline_mode mode = { };
|
struct drm_cmdline_mode mode = { };
|
||||||
|
|
||||||
FAIL_ON(drm_mode_parse_command_line_for_connector("720x480-test",
|
FAIL_ON(drm_mode_parse_command_line_for_connector("720x480-test",
|
||||||
&connector,
|
&no_connector,
|
||||||
&mode));
|
&mode));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -203,11 +195,10 @@ static int drm_cmdline_test_res_bad_bpp(void *ignored)
|
||||||
|
|
||||||
static int drm_cmdline_test_res_refresh(void *ignored)
|
static int drm_cmdline_test_res_refresh(void *ignored)
|
||||||
{
|
{
|
||||||
struct drm_connector connector = { };
|
|
||||||
struct drm_cmdline_mode mode = { };
|
struct drm_cmdline_mode mode = { };
|
||||||
|
|
||||||
FAIL_ON(!drm_mode_parse_command_line_for_connector("720x480@60",
|
FAIL_ON(!drm_mode_parse_command_line_for_connector("720x480@60",
|
||||||
&connector,
|
&no_connector,
|
||||||
&mode));
|
&mode));
|
||||||
FAIL_ON(!mode.specified);
|
FAIL_ON(!mode.specified);
|
||||||
FAIL_ON(mode.xres != 720);
|
FAIL_ON(mode.xres != 720);
|
||||||
|
@ -229,11 +220,10 @@ static int drm_cmdline_test_res_refresh(void *ignored)
|
||||||
|
|
||||||
static int drm_cmdline_test_res_bad_refresh(void *ignored)
|
static int drm_cmdline_test_res_bad_refresh(void *ignored)
|
||||||
{
|
{
|
||||||
struct drm_connector connector = { };
|
|
||||||
struct drm_cmdline_mode mode = { };
|
struct drm_cmdline_mode mode = { };
|
||||||
|
|
||||||
FAIL_ON(drm_mode_parse_command_line_for_connector("720x480@refresh",
|
FAIL_ON(drm_mode_parse_command_line_for_connector("720x480@refresh",
|
||||||
&connector,
|
&no_connector,
|
||||||
&mode));
|
&mode));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -241,11 +231,10 @@ static int drm_cmdline_test_res_bad_refresh(void *ignored)
|
||||||
|
|
||||||
static int drm_cmdline_test_res_bpp_refresh(void *ignored)
|
static int drm_cmdline_test_res_bpp_refresh(void *ignored)
|
||||||
{
|
{
|
||||||
struct drm_connector connector = { };
|
|
||||||
struct drm_cmdline_mode mode = { };
|
struct drm_cmdline_mode mode = { };
|
||||||
|
|
||||||
FAIL_ON(!drm_mode_parse_command_line_for_connector("720x480-24@60",
|
FAIL_ON(!drm_mode_parse_command_line_for_connector("720x480-24@60",
|
||||||
&connector,
|
&no_connector,
|
||||||
&mode));
|
&mode));
|
||||||
FAIL_ON(!mode.specified);
|
FAIL_ON(!mode.specified);
|
||||||
FAIL_ON(mode.xres != 720);
|
FAIL_ON(mode.xres != 720);
|
||||||
|
@ -268,11 +257,10 @@ static int drm_cmdline_test_res_bpp_refresh(void *ignored)
|
||||||
|
|
||||||
static int drm_cmdline_test_res_bpp_refresh_interlaced(void *ignored)
|
static int drm_cmdline_test_res_bpp_refresh_interlaced(void *ignored)
|
||||||
{
|
{
|
||||||
struct drm_connector connector = { };
|
|
||||||
struct drm_cmdline_mode mode = { };
|
struct drm_cmdline_mode mode = { };
|
||||||
|
|
||||||
FAIL_ON(!drm_mode_parse_command_line_for_connector("720x480-24@60i",
|
FAIL_ON(!drm_mode_parse_command_line_for_connector("720x480-24@60i",
|
||||||
&connector,
|
&no_connector,
|
||||||
&mode));
|
&mode));
|
||||||
FAIL_ON(!mode.specified);
|
FAIL_ON(!mode.specified);
|
||||||
FAIL_ON(mode.xres != 720);
|
FAIL_ON(mode.xres != 720);
|
||||||
|
@ -295,11 +283,10 @@ static int drm_cmdline_test_res_bpp_refresh_interlaced(void *ignored)
|
||||||
|
|
||||||
static int drm_cmdline_test_res_bpp_refresh_margins(void *ignored)
|
static int drm_cmdline_test_res_bpp_refresh_margins(void *ignored)
|
||||||
{
|
{
|
||||||
struct drm_connector connector = { };
|
|
||||||
struct drm_cmdline_mode mode = { };
|
struct drm_cmdline_mode mode = { };
|
||||||
|
|
||||||
FAIL_ON(!drm_mode_parse_command_line_for_connector("720x480-24@60m",
|
FAIL_ON(!drm_mode_parse_command_line_for_connector("720x480-24@60m",
|
||||||
&connector,
|
&no_connector,
|
||||||
&mode));
|
&mode));
|
||||||
FAIL_ON(!mode.specified);
|
FAIL_ON(!mode.specified);
|
||||||
FAIL_ON(mode.xres != 720);
|
FAIL_ON(mode.xres != 720);
|
||||||
|
@ -322,11 +309,10 @@ static int drm_cmdline_test_res_bpp_refresh_margins(void *ignored)
|
||||||
|
|
||||||
static int drm_cmdline_test_res_bpp_refresh_force_off(void *ignored)
|
static int drm_cmdline_test_res_bpp_refresh_force_off(void *ignored)
|
||||||
{
|
{
|
||||||
struct drm_connector connector = { };
|
|
||||||
struct drm_cmdline_mode mode = { };
|
struct drm_cmdline_mode mode = { };
|
||||||
|
|
||||||
FAIL_ON(!drm_mode_parse_command_line_for_connector("720x480-24@60d",
|
FAIL_ON(!drm_mode_parse_command_line_for_connector("720x480-24@60d",
|
||||||
&connector,
|
&no_connector,
|
||||||
&mode));
|
&mode));
|
||||||
FAIL_ON(!mode.specified);
|
FAIL_ON(!mode.specified);
|
||||||
FAIL_ON(mode.xres != 720);
|
FAIL_ON(mode.xres != 720);
|
||||||
|
@ -349,11 +335,10 @@ static int drm_cmdline_test_res_bpp_refresh_force_off(void *ignored)
|
||||||
|
|
||||||
static int drm_cmdline_test_res_bpp_refresh_force_on_off(void *ignored)
|
static int drm_cmdline_test_res_bpp_refresh_force_on_off(void *ignored)
|
||||||
{
|
{
|
||||||
struct drm_connector connector = { };
|
|
||||||
struct drm_cmdline_mode mode = { };
|
struct drm_cmdline_mode mode = { };
|
||||||
|
|
||||||
FAIL_ON(drm_mode_parse_command_line_for_connector("720x480-24@60de",
|
FAIL_ON(drm_mode_parse_command_line_for_connector("720x480-24@60de",
|
||||||
&connector,
|
&no_connector,
|
||||||
&mode));
|
&mode));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -361,11 +346,10 @@ static int drm_cmdline_test_res_bpp_refresh_force_on_off(void *ignored)
|
||||||
|
|
||||||
static int drm_cmdline_test_res_bpp_refresh_force_on(void *ignored)
|
static int drm_cmdline_test_res_bpp_refresh_force_on(void *ignored)
|
||||||
{
|
{
|
||||||
struct drm_connector connector = { };
|
|
||||||
struct drm_cmdline_mode mode = { };
|
struct drm_cmdline_mode mode = { };
|
||||||
|
|
||||||
FAIL_ON(!drm_mode_parse_command_line_for_connector("720x480-24@60e",
|
FAIL_ON(!drm_mode_parse_command_line_for_connector("720x480-24@60e",
|
||||||
&connector,
|
&no_connector,
|
||||||
&mode));
|
&mode));
|
||||||
FAIL_ON(!mode.specified);
|
FAIL_ON(!mode.specified);
|
||||||
FAIL_ON(mode.xres != 720);
|
FAIL_ON(mode.xres != 720);
|
||||||
|
@ -388,11 +372,10 @@ static int drm_cmdline_test_res_bpp_refresh_force_on(void *ignored)
|
||||||
|
|
||||||
static int drm_cmdline_test_res_bpp_refresh_force_on_analog(void *ignored)
|
static int drm_cmdline_test_res_bpp_refresh_force_on_analog(void *ignored)
|
||||||
{
|
{
|
||||||
struct drm_connector connector = { };
|
|
||||||
struct drm_cmdline_mode mode = { };
|
struct drm_cmdline_mode mode = { };
|
||||||
|
|
||||||
FAIL_ON(!drm_mode_parse_command_line_for_connector("720x480-24@60D",
|
FAIL_ON(!drm_mode_parse_command_line_for_connector("720x480-24@60D",
|
||||||
&connector,
|
&no_connector,
|
||||||
&mode));
|
&mode));
|
||||||
FAIL_ON(!mode.specified);
|
FAIL_ON(!mode.specified);
|
||||||
FAIL_ON(mode.xres != 720);
|
FAIL_ON(mode.xres != 720);
|
||||||
|
@ -415,10 +398,11 @@ static int drm_cmdline_test_res_bpp_refresh_force_on_analog(void *ignored)
|
||||||
|
|
||||||
static int drm_cmdline_test_res_bpp_refresh_force_on_digital(void *ignored)
|
static int drm_cmdline_test_res_bpp_refresh_force_on_digital(void *ignored)
|
||||||
{
|
{
|
||||||
struct drm_connector connector = { };
|
|
||||||
struct drm_cmdline_mode mode = { };
|
struct drm_cmdline_mode mode = { };
|
||||||
|
static const struct drm_connector connector = {
|
||||||
|
.connector_type = DRM_MODE_CONNECTOR_DVII,
|
||||||
|
};
|
||||||
|
|
||||||
connector.connector_type = DRM_MODE_CONNECTOR_DVII;
|
|
||||||
FAIL_ON(!drm_mode_parse_command_line_for_connector("720x480-24@60D",
|
FAIL_ON(!drm_mode_parse_command_line_for_connector("720x480-24@60D",
|
||||||
&connector,
|
&connector,
|
||||||
&mode));
|
&mode));
|
||||||
|
@ -443,11 +427,10 @@ static int drm_cmdline_test_res_bpp_refresh_force_on_digital(void *ignored)
|
||||||
|
|
||||||
static int drm_cmdline_test_res_bpp_refresh_interlaced_margins_force_on(void *ignored)
|
static int drm_cmdline_test_res_bpp_refresh_interlaced_margins_force_on(void *ignored)
|
||||||
{
|
{
|
||||||
struct drm_connector connector = { };
|
|
||||||
struct drm_cmdline_mode mode = { };
|
struct drm_cmdline_mode mode = { };
|
||||||
|
|
||||||
FAIL_ON(!drm_mode_parse_command_line_for_connector("720x480-24@60ime",
|
FAIL_ON(!drm_mode_parse_command_line_for_connector("720x480-24@60ime",
|
||||||
&connector,
|
&no_connector,
|
||||||
&mode));
|
&mode));
|
||||||
FAIL_ON(!mode.specified);
|
FAIL_ON(!mode.specified);
|
||||||
FAIL_ON(mode.xres != 720);
|
FAIL_ON(mode.xres != 720);
|
||||||
|
@ -470,11 +453,10 @@ static int drm_cmdline_test_res_bpp_refresh_interlaced_margins_force_on(void *ig
|
||||||
|
|
||||||
static int drm_cmdline_test_res_margins_force_on(void *ignored)
|
static int drm_cmdline_test_res_margins_force_on(void *ignored)
|
||||||
{
|
{
|
||||||
struct drm_connector connector = { };
|
|
||||||
struct drm_cmdline_mode mode = { };
|
struct drm_cmdline_mode mode = { };
|
||||||
|
|
||||||
FAIL_ON(!drm_mode_parse_command_line_for_connector("720x480me",
|
FAIL_ON(!drm_mode_parse_command_line_for_connector("720x480me",
|
||||||
&connector,
|
&no_connector,
|
||||||
&mode));
|
&mode));
|
||||||
FAIL_ON(!mode.specified);
|
FAIL_ON(!mode.specified);
|
||||||
FAIL_ON(mode.xres != 720);
|
FAIL_ON(mode.xres != 720);
|
||||||
|
@ -495,11 +477,10 @@ static int drm_cmdline_test_res_margins_force_on(void *ignored)
|
||||||
|
|
||||||
static int drm_cmdline_test_res_vesa_margins(void *ignored)
|
static int drm_cmdline_test_res_vesa_margins(void *ignored)
|
||||||
{
|
{
|
||||||
struct drm_connector connector = { };
|
|
||||||
struct drm_cmdline_mode mode = { };
|
struct drm_cmdline_mode mode = { };
|
||||||
|
|
||||||
FAIL_ON(!drm_mode_parse_command_line_for_connector("720x480Mm",
|
FAIL_ON(!drm_mode_parse_command_line_for_connector("720x480Mm",
|
||||||
&connector,
|
&no_connector,
|
||||||
&mode));
|
&mode));
|
||||||
FAIL_ON(!mode.specified);
|
FAIL_ON(!mode.specified);
|
||||||
FAIL_ON(mode.xres != 720);
|
FAIL_ON(mode.xres != 720);
|
||||||
|
@ -520,11 +501,10 @@ static int drm_cmdline_test_res_vesa_margins(void *ignored)
|
||||||
|
|
||||||
static int drm_cmdline_test_res_invalid_mode(void *ignored)
|
static int drm_cmdline_test_res_invalid_mode(void *ignored)
|
||||||
{
|
{
|
||||||
struct drm_connector connector = { };
|
|
||||||
struct drm_cmdline_mode mode = { };
|
struct drm_cmdline_mode mode = { };
|
||||||
|
|
||||||
FAIL_ON(drm_mode_parse_command_line_for_connector("720x480f",
|
FAIL_ON(drm_mode_parse_command_line_for_connector("720x480f",
|
||||||
&connector,
|
&no_connector,
|
||||||
&mode));
|
&mode));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -532,11 +512,10 @@ static int drm_cmdline_test_res_invalid_mode(void *ignored)
|
||||||
|
|
||||||
static int drm_cmdline_test_res_bpp_wrong_place_mode(void *ignored)
|
static int drm_cmdline_test_res_bpp_wrong_place_mode(void *ignored)
|
||||||
{
|
{
|
||||||
struct drm_connector connector = { };
|
|
||||||
struct drm_cmdline_mode mode = { };
|
struct drm_cmdline_mode mode = { };
|
||||||
|
|
||||||
FAIL_ON(drm_mode_parse_command_line_for_connector("720x480e-24",
|
FAIL_ON(drm_mode_parse_command_line_for_connector("720x480e-24",
|
||||||
&connector,
|
&no_connector,
|
||||||
&mode));
|
&mode));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -544,11 +523,10 @@ static int drm_cmdline_test_res_bpp_wrong_place_mode(void *ignored)
|
||||||
|
|
||||||
static int drm_cmdline_test_name(void *ignored)
|
static int drm_cmdline_test_name(void *ignored)
|
||||||
{
|
{
|
||||||
struct drm_connector connector = { };
|
|
||||||
struct drm_cmdline_mode mode = { };
|
struct drm_cmdline_mode mode = { };
|
||||||
|
|
||||||
FAIL_ON(!drm_mode_parse_command_line_for_connector("NTSC",
|
FAIL_ON(!drm_mode_parse_command_line_for_connector("NTSC",
|
||||||
&connector,
|
&no_connector,
|
||||||
&mode));
|
&mode));
|
||||||
FAIL_ON(strcmp(mode.name, "NTSC"));
|
FAIL_ON(strcmp(mode.name, "NTSC"));
|
||||||
FAIL_ON(mode.refresh_specified);
|
FAIL_ON(mode.refresh_specified);
|
||||||
|
@ -559,11 +537,10 @@ static int drm_cmdline_test_name(void *ignored)
|
||||||
|
|
||||||
static int drm_cmdline_test_name_bpp(void *ignored)
|
static int drm_cmdline_test_name_bpp(void *ignored)
|
||||||
{
|
{
|
||||||
struct drm_connector connector = { };
|
|
||||||
struct drm_cmdline_mode mode = { };
|
struct drm_cmdline_mode mode = { };
|
||||||
|
|
||||||
FAIL_ON(!drm_mode_parse_command_line_for_connector("NTSC-24",
|
FAIL_ON(!drm_mode_parse_command_line_for_connector("NTSC-24",
|
||||||
&connector,
|
&no_connector,
|
||||||
&mode));
|
&mode));
|
||||||
FAIL_ON(strcmp(mode.name, "NTSC"));
|
FAIL_ON(strcmp(mode.name, "NTSC"));
|
||||||
|
|
||||||
|
@ -577,11 +554,10 @@ static int drm_cmdline_test_name_bpp(void *ignored)
|
||||||
|
|
||||||
static int drm_cmdline_test_name_bpp_refresh(void *ignored)
|
static int drm_cmdline_test_name_bpp_refresh(void *ignored)
|
||||||
{
|
{
|
||||||
struct drm_connector connector = { };
|
|
||||||
struct drm_cmdline_mode mode = { };
|
struct drm_cmdline_mode mode = { };
|
||||||
|
|
||||||
FAIL_ON(drm_mode_parse_command_line_for_connector("NTSC-24@60",
|
FAIL_ON(drm_mode_parse_command_line_for_connector("NTSC-24@60",
|
||||||
&connector,
|
&no_connector,
|
||||||
&mode));
|
&mode));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -589,11 +565,10 @@ static int drm_cmdline_test_name_bpp_refresh(void *ignored)
|
||||||
|
|
||||||
static int drm_cmdline_test_name_refresh(void *ignored)
|
static int drm_cmdline_test_name_refresh(void *ignored)
|
||||||
{
|
{
|
||||||
struct drm_connector connector = { };
|
|
||||||
struct drm_cmdline_mode mode = { };
|
struct drm_cmdline_mode mode = { };
|
||||||
|
|
||||||
FAIL_ON(drm_mode_parse_command_line_for_connector("NTSC@60",
|
FAIL_ON(drm_mode_parse_command_line_for_connector("NTSC@60",
|
||||||
&connector,
|
&no_connector,
|
||||||
&mode));
|
&mode));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -601,11 +576,10 @@ static int drm_cmdline_test_name_refresh(void *ignored)
|
||||||
|
|
||||||
static int drm_cmdline_test_name_refresh_wrong_mode(void *ignored)
|
static int drm_cmdline_test_name_refresh_wrong_mode(void *ignored)
|
||||||
{
|
{
|
||||||
struct drm_connector connector = { };
|
|
||||||
struct drm_cmdline_mode mode = { };
|
struct drm_cmdline_mode mode = { };
|
||||||
|
|
||||||
FAIL_ON(drm_mode_parse_command_line_for_connector("NTSC@60m",
|
FAIL_ON(drm_mode_parse_command_line_for_connector("NTSC@60m",
|
||||||
&connector,
|
&no_connector,
|
||||||
&mode));
|
&mode));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -613,11 +587,10 @@ static int drm_cmdline_test_name_refresh_wrong_mode(void *ignored)
|
||||||
|
|
||||||
static int drm_cmdline_test_name_refresh_invalid_mode(void *ignored)
|
static int drm_cmdline_test_name_refresh_invalid_mode(void *ignored)
|
||||||
{
|
{
|
||||||
struct drm_connector connector = { };
|
|
||||||
struct drm_cmdline_mode mode = { };
|
struct drm_cmdline_mode mode = { };
|
||||||
|
|
||||||
FAIL_ON(drm_mode_parse_command_line_for_connector("NTSC@60f",
|
FAIL_ON(drm_mode_parse_command_line_for_connector("NTSC@60f",
|
||||||
&connector,
|
&no_connector,
|
||||||
&mode));
|
&mode));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -625,11 +598,10 @@ static int drm_cmdline_test_name_refresh_invalid_mode(void *ignored)
|
||||||
|
|
||||||
static int drm_cmdline_test_name_option(void *ignored)
|
static int drm_cmdline_test_name_option(void *ignored)
|
||||||
{
|
{
|
||||||
struct drm_connector connector = { };
|
|
||||||
struct drm_cmdline_mode mode = { };
|
struct drm_cmdline_mode mode = { };
|
||||||
|
|
||||||
FAIL_ON(!drm_mode_parse_command_line_for_connector("NTSC,rotate=180",
|
FAIL_ON(!drm_mode_parse_command_line_for_connector("NTSC,rotate=180",
|
||||||
&connector,
|
&no_connector,
|
||||||
&mode));
|
&mode));
|
||||||
FAIL_ON(!mode.specified);
|
FAIL_ON(!mode.specified);
|
||||||
FAIL_ON(strcmp(mode.name, "NTSC"));
|
FAIL_ON(strcmp(mode.name, "NTSC"));
|
||||||
|
@ -640,11 +612,10 @@ static int drm_cmdline_test_name_option(void *ignored)
|
||||||
|
|
||||||
static int drm_cmdline_test_name_bpp_option(void *ignored)
|
static int drm_cmdline_test_name_bpp_option(void *ignored)
|
||||||
{
|
{
|
||||||
struct drm_connector connector = { };
|
|
||||||
struct drm_cmdline_mode mode = { };
|
struct drm_cmdline_mode mode = { };
|
||||||
|
|
||||||
FAIL_ON(!drm_mode_parse_command_line_for_connector("NTSC-24,rotate=180",
|
FAIL_ON(!drm_mode_parse_command_line_for_connector("NTSC-24,rotate=180",
|
||||||
&connector,
|
&no_connector,
|
||||||
&mode));
|
&mode));
|
||||||
FAIL_ON(!mode.specified);
|
FAIL_ON(!mode.specified);
|
||||||
FAIL_ON(strcmp(mode.name, "NTSC"));
|
FAIL_ON(strcmp(mode.name, "NTSC"));
|
||||||
|
@ -657,11 +628,10 @@ static int drm_cmdline_test_name_bpp_option(void *ignored)
|
||||||
|
|
||||||
static int drm_cmdline_test_rotate_0(void *ignored)
|
static int drm_cmdline_test_rotate_0(void *ignored)
|
||||||
{
|
{
|
||||||
struct drm_connector connector = { };
|
|
||||||
struct drm_cmdline_mode mode = { };
|
struct drm_cmdline_mode mode = { };
|
||||||
|
|
||||||
FAIL_ON(!drm_mode_parse_command_line_for_connector("720x480,rotate=0",
|
FAIL_ON(!drm_mode_parse_command_line_for_connector("720x480,rotate=0",
|
||||||
&connector,
|
&no_connector,
|
||||||
&mode));
|
&mode));
|
||||||
FAIL_ON(!mode.specified);
|
FAIL_ON(!mode.specified);
|
||||||
FAIL_ON(mode.xres != 720);
|
FAIL_ON(mode.xres != 720);
|
||||||
|
@ -683,11 +653,10 @@ static int drm_cmdline_test_rotate_0(void *ignored)
|
||||||
|
|
||||||
static int drm_cmdline_test_rotate_90(void *ignored)
|
static int drm_cmdline_test_rotate_90(void *ignored)
|
||||||
{
|
{
|
||||||
struct drm_connector connector = { };
|
|
||||||
struct drm_cmdline_mode mode = { };
|
struct drm_cmdline_mode mode = { };
|
||||||
|
|
||||||
FAIL_ON(!drm_mode_parse_command_line_for_connector("720x480,rotate=90",
|
FAIL_ON(!drm_mode_parse_command_line_for_connector("720x480,rotate=90",
|
||||||
&connector,
|
&no_connector,
|
||||||
&mode));
|
&mode));
|
||||||
FAIL_ON(!mode.specified);
|
FAIL_ON(!mode.specified);
|
||||||
FAIL_ON(mode.xres != 720);
|
FAIL_ON(mode.xres != 720);
|
||||||
|
@ -709,11 +678,10 @@ static int drm_cmdline_test_rotate_90(void *ignored)
|
||||||
|
|
||||||
static int drm_cmdline_test_rotate_180(void *ignored)
|
static int drm_cmdline_test_rotate_180(void *ignored)
|
||||||
{
|
{
|
||||||
struct drm_connector connector = { };
|
|
||||||
struct drm_cmdline_mode mode = { };
|
struct drm_cmdline_mode mode = { };
|
||||||
|
|
||||||
FAIL_ON(!drm_mode_parse_command_line_for_connector("720x480,rotate=180",
|
FAIL_ON(!drm_mode_parse_command_line_for_connector("720x480,rotate=180",
|
||||||
&connector,
|
&no_connector,
|
||||||
&mode));
|
&mode));
|
||||||
FAIL_ON(!mode.specified);
|
FAIL_ON(!mode.specified);
|
||||||
FAIL_ON(mode.xres != 720);
|
FAIL_ON(mode.xres != 720);
|
||||||
|
@ -735,11 +703,10 @@ static int drm_cmdline_test_rotate_180(void *ignored)
|
||||||
|
|
||||||
static int drm_cmdline_test_rotate_270(void *ignored)
|
static int drm_cmdline_test_rotate_270(void *ignored)
|
||||||
{
|
{
|
||||||
struct drm_connector connector = { };
|
|
||||||
struct drm_cmdline_mode mode = { };
|
struct drm_cmdline_mode mode = { };
|
||||||
|
|
||||||
FAIL_ON(!drm_mode_parse_command_line_for_connector("720x480,rotate=270",
|
FAIL_ON(!drm_mode_parse_command_line_for_connector("720x480,rotate=270",
|
||||||
&connector,
|
&no_connector,
|
||||||
&mode));
|
&mode));
|
||||||
FAIL_ON(!mode.specified);
|
FAIL_ON(!mode.specified);
|
||||||
FAIL_ON(mode.xres != 720);
|
FAIL_ON(mode.xres != 720);
|
||||||
|
@ -761,11 +728,10 @@ static int drm_cmdline_test_rotate_270(void *ignored)
|
||||||
|
|
||||||
static int drm_cmdline_test_rotate_invalid_val(void *ignored)
|
static int drm_cmdline_test_rotate_invalid_val(void *ignored)
|
||||||
{
|
{
|
||||||
struct drm_connector connector = { };
|
|
||||||
struct drm_cmdline_mode mode = { };
|
struct drm_cmdline_mode mode = { };
|
||||||
|
|
||||||
FAIL_ON(drm_mode_parse_command_line_for_connector("720x480,rotate=42",
|
FAIL_ON(drm_mode_parse_command_line_for_connector("720x480,rotate=42",
|
||||||
&connector,
|
&no_connector,
|
||||||
&mode));
|
&mode));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -773,11 +739,10 @@ static int drm_cmdline_test_rotate_invalid_val(void *ignored)
|
||||||
|
|
||||||
static int drm_cmdline_test_rotate_truncated(void *ignored)
|
static int drm_cmdline_test_rotate_truncated(void *ignored)
|
||||||
{
|
{
|
||||||
struct drm_connector connector = { };
|
|
||||||
struct drm_cmdline_mode mode = { };
|
struct drm_cmdline_mode mode = { };
|
||||||
|
|
||||||
FAIL_ON(drm_mode_parse_command_line_for_connector("720x480,rotate=",
|
FAIL_ON(drm_mode_parse_command_line_for_connector("720x480,rotate=",
|
||||||
&connector,
|
&no_connector,
|
||||||
&mode));
|
&mode));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -785,11 +750,10 @@ static int drm_cmdline_test_rotate_truncated(void *ignored)
|
||||||
|
|
||||||
static int drm_cmdline_test_hmirror(void *ignored)
|
static int drm_cmdline_test_hmirror(void *ignored)
|
||||||
{
|
{
|
||||||
struct drm_connector connector = { };
|
|
||||||
struct drm_cmdline_mode mode = { };
|
struct drm_cmdline_mode mode = { };
|
||||||
|
|
||||||
FAIL_ON(!drm_mode_parse_command_line_for_connector("720x480,reflect_x",
|
FAIL_ON(!drm_mode_parse_command_line_for_connector("720x480,reflect_x",
|
||||||
&connector,
|
&no_connector,
|
||||||
&mode));
|
&mode));
|
||||||
FAIL_ON(!mode.specified);
|
FAIL_ON(!mode.specified);
|
||||||
FAIL_ON(mode.xres != 720);
|
FAIL_ON(mode.xres != 720);
|
||||||
|
@ -811,11 +775,10 @@ static int drm_cmdline_test_hmirror(void *ignored)
|
||||||
|
|
||||||
static int drm_cmdline_test_vmirror(void *ignored)
|
static int drm_cmdline_test_vmirror(void *ignored)
|
||||||
{
|
{
|
||||||
struct drm_connector connector = { };
|
|
||||||
struct drm_cmdline_mode mode = { };
|
struct drm_cmdline_mode mode = { };
|
||||||
|
|
||||||
FAIL_ON(!drm_mode_parse_command_line_for_connector("720x480,reflect_y",
|
FAIL_ON(!drm_mode_parse_command_line_for_connector("720x480,reflect_y",
|
||||||
&connector,
|
&no_connector,
|
||||||
&mode));
|
&mode));
|
||||||
FAIL_ON(!mode.specified);
|
FAIL_ON(!mode.specified);
|
||||||
FAIL_ON(mode.xres != 720);
|
FAIL_ON(mode.xres != 720);
|
||||||
|
@ -837,11 +800,10 @@ static int drm_cmdline_test_vmirror(void *ignored)
|
||||||
|
|
||||||
static int drm_cmdline_test_margin_options(void *ignored)
|
static int drm_cmdline_test_margin_options(void *ignored)
|
||||||
{
|
{
|
||||||
struct drm_connector connector = { };
|
|
||||||
struct drm_cmdline_mode mode = { };
|
struct drm_cmdline_mode mode = { };
|
||||||
|
|
||||||
FAIL_ON(!drm_mode_parse_command_line_for_connector("720x480,margin_right=14,margin_left=24,margin_bottom=36,margin_top=42",
|
FAIL_ON(!drm_mode_parse_command_line_for_connector("720x480,margin_right=14,margin_left=24,margin_bottom=36,margin_top=42",
|
||||||
&connector,
|
&no_connector,
|
||||||
&mode));
|
&mode));
|
||||||
FAIL_ON(!mode.specified);
|
FAIL_ON(!mode.specified);
|
||||||
FAIL_ON(mode.xres != 720);
|
FAIL_ON(mode.xres != 720);
|
||||||
|
@ -866,11 +828,10 @@ static int drm_cmdline_test_margin_options(void *ignored)
|
||||||
|
|
||||||
static int drm_cmdline_test_multiple_options(void *ignored)
|
static int drm_cmdline_test_multiple_options(void *ignored)
|
||||||
{
|
{
|
||||||
struct drm_connector connector = { };
|
|
||||||
struct drm_cmdline_mode mode = { };
|
struct drm_cmdline_mode mode = { };
|
||||||
|
|
||||||
FAIL_ON(!drm_mode_parse_command_line_for_connector("720x480,rotate=270,reflect_x",
|
FAIL_ON(!drm_mode_parse_command_line_for_connector("720x480,rotate=270,reflect_x",
|
||||||
&connector,
|
&no_connector,
|
||||||
&mode));
|
&mode));
|
||||||
FAIL_ON(!mode.specified);
|
FAIL_ON(!mode.specified);
|
||||||
FAIL_ON(mode.xres != 720);
|
FAIL_ON(mode.xres != 720);
|
||||||
|
@ -892,11 +853,10 @@ static int drm_cmdline_test_multiple_options(void *ignored)
|
||||||
|
|
||||||
static int drm_cmdline_test_invalid_option(void *ignored)
|
static int drm_cmdline_test_invalid_option(void *ignored)
|
||||||
{
|
{
|
||||||
struct drm_connector connector = { };
|
|
||||||
struct drm_cmdline_mode mode = { };
|
struct drm_cmdline_mode mode = { };
|
||||||
|
|
||||||
FAIL_ON(drm_mode_parse_command_line_for_connector("720x480,test=42",
|
FAIL_ON(drm_mode_parse_command_line_for_connector("720x480,test=42",
|
||||||
&connector,
|
&no_connector,
|
||||||
&mode));
|
&mode));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -537,7 +537,7 @@ void drm_connector_list_update(struct drm_connector *connector);
|
||||||
/* parsing cmdline modes */
|
/* parsing cmdline modes */
|
||||||
bool
|
bool
|
||||||
drm_mode_parse_command_line_for_connector(const char *mode_option,
|
drm_mode_parse_command_line_for_connector(const char *mode_option,
|
||||||
struct drm_connector *connector,
|
const struct drm_connector *connector,
|
||||||
struct drm_cmdline_mode *mode);
|
struct drm_cmdline_mode *mode);
|
||||||
struct drm_display_mode *
|
struct drm_display_mode *
|
||||||
drm_mode_create_from_cmdline_mode(struct drm_device *dev,
|
drm_mode_create_from_cmdline_mode(struct drm_device *dev,
|
||||||
|
|
Loading…
Reference in a new issue