Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
59345847
Commit
59345847
authored
Jul 11, 2013
by
Patrik Jakobsson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/gma500: Add generic encoder functions
Signed-off-by:
Patrik Jakobsson
<
patrik.r.jakobsson@gmail.com
>
parent
561573bf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
0 deletions
+55
-0
drivers/gpu/drm/gma500/gma_display.c
drivers/gpu/drm/gma500/gma_display.c
+41
-0
drivers/gpu/drm/gma500/gma_display.h
drivers/gpu/drm/gma500/gma_display.h
+4
-0
drivers/gpu/drm/gma500/psb_intel_drv.h
drivers/gpu/drm/gma500/psb_intel_drv.h
+10
-0
No files found.
drivers/gpu/drm/gma500/gma_display.c
View file @
59345847
...
...
@@ -519,6 +519,47 @@ void gma_crtc_destroy(struct drm_crtc *crtc)
kfree
(
psb_intel_crtc
);
}
void
gma_encoder_prepare
(
struct
drm_encoder
*
encoder
)
{
struct
drm_encoder_helper_funcs
*
encoder_funcs
=
encoder
->
helper_private
;
/* lvds has its own version of prepare see psb_intel_lvds_prepare */
encoder_funcs
->
dpms
(
encoder
,
DRM_MODE_DPMS_OFF
);
}
void
gma_encoder_commit
(
struct
drm_encoder
*
encoder
)
{
struct
drm_encoder_helper_funcs
*
encoder_funcs
=
encoder
->
helper_private
;
/* lvds has its own version of commit see psb_intel_lvds_commit */
encoder_funcs
->
dpms
(
encoder
,
DRM_MODE_DPMS_ON
);
}
void
gma_encoder_destroy
(
struct
drm_encoder
*
encoder
)
{
struct
psb_intel_encoder
*
intel_encoder
=
to_psb_intel_encoder
(
encoder
);
drm_encoder_cleanup
(
encoder
);
kfree
(
intel_encoder
);
}
/* Currently there is only a 1:1 mapping of encoders and connectors */
struct
drm_encoder
*
gma_best_encoder
(
struct
drm_connector
*
connector
)
{
struct
psb_intel_encoder
*
psb_intel_encoder
=
psb_intel_attached_encoder
(
connector
);
return
&
psb_intel_encoder
->
base
;
}
void
gma_connector_attach_encoder
(
struct
psb_intel_connector
*
connector
,
struct
psb_intel_encoder
*
encoder
)
{
connector
->
encoder
=
encoder
;
drm_mode_connector_attach_encoder
(
&
connector
->
base
,
&
encoder
->
base
);
}
#define GMA_PLL_INVALID(s) {
/* DRM_ERROR(s); */
return false; }
bool
gma_pll_is_valid
(
struct
drm_crtc
*
crtc
,
...
...
drivers/gpu/drm/gma500/gma_display.h
View file @
59345847
...
...
@@ -81,6 +81,10 @@ extern void gma_crtc_commit(struct drm_crtc *crtc);
extern
void
gma_crtc_disable
(
struct
drm_crtc
*
crtc
);
extern
void
gma_crtc_destroy
(
struct
drm_crtc
*
crtc
);
extern
void
gma_encoder_prepare
(
struct
drm_encoder
*
encoder
);
extern
void
gma_encoder_commit
(
struct
drm_encoder
*
encoder
);
extern
void
gma_encoder_destroy
(
struct
drm_encoder
*
encoder
);
/* Common clock related functions */
extern
const
struct
gma_limit_t
*
gma_limit
(
struct
drm_crtc
*
crtc
,
int
refclk
);
extern
void
gma_clock
(
int
refclk
,
struct
gma_clock_t
*
clock
);
...
...
drivers/gpu/drm/gma500/psb_intel_drv.h
View file @
59345847
...
...
@@ -230,12 +230,22 @@ extern void psb_intel_encoder_prepare(struct drm_encoder *encoder);
extern
void
psb_intel_encoder_commit
(
struct
drm_encoder
*
encoder
);
extern
void
psb_intel_encoder_destroy
(
struct
drm_encoder
*
encoder
);
extern
struct
drm_encoder
*
gma_best_encoder
(
struct
drm_connector
*
connector
);
extern
void
gma_connector_attach_encoder
(
struct
psb_intel_connector
*
connector
,
struct
psb_intel_encoder
*
encoder
);
static
inline
struct
psb_intel_encoder
*
psb_intel_attached_encoder
(
struct
drm_connector
*
connector
)
{
return
to_psb_intel_connector
(
connector
)
->
encoder
;
}
static
inline
struct
psb_intel_encoder
*
gma_attached_encoder
(
struct
drm_connector
*
connector
)
{
return
to_psb_intel_connector
(
connector
)
->
encoder
;
}
extern
void
psb_intel_connector_attach_encoder
(
struct
psb_intel_connector
*
connector
,
struct
psb_intel_encoder
*
encoder
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment