[PATCH 1/2] radeon: cleanup the entity rec
Alex Deucher
alexdeucher at gmail.com
Mon Jul 27 10:18:15 PDT 2015
On Sun, Jul 26, 2015 at 7:23 PM, Dave Airlie <airlied at gmail.com> wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> Some of these were set, some of them were
> always opposites, so clean things up.
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
For the series:
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
> ---
> src/drmmode_display.c | 2 +-
> src/radeon.h | 1 -
> src/radeon_kms.c | 5 -----
> src/radeon_probe.c | 4 ----
> src/radeon_probe.h | 4 ----
> 5 files changed, 1 insertion(+), 15 deletions(-)
>
> diff --git a/src/drmmode_display.c b/src/drmmode_display.c
> index 337ee55..a769013 100644
> --- a/src/drmmode_display.c
> +++ b/src/drmmode_display.c
> @@ -1561,7 +1561,7 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_r
> if (!RADEONZaphodStringMatches(pScrn, s, name))
> goto out_free_encoders;
> } else {
> - if (info->IsPrimary && (num != 0))
> + if (!info->IsSecondary && (num != 0))
> goto out_free_encoders;
> else if (info->IsSecondary && (num != 1))
> goto out_free_encoders;
> diff --git a/src/radeon.h b/src/radeon.h
> index d6f18fa..88df93f 100644
> --- a/src/radeon.h
> +++ b/src/radeon.h
> @@ -499,7 +499,6 @@ typedef struct {
> #endif
>
> Bool IsSecondary;
> - Bool IsPrimary;
>
> Bool r600_shadow_fb;
> void *fb_shadow;
> diff --git a/src/radeon_kms.c b/src/radeon_kms.c
> index 2dad0e6..14de0eb 100644
> --- a/src/radeon_kms.c
> +++ b/src/radeon_kms.c
> @@ -1079,7 +1079,6 @@ Bool RADEONPreInit_KMS(ScrnInfoPtr pScrn, int flags)
>
> info = RADEONPTR(pScrn);
> info->IsSecondary = FALSE;
> - info->IsPrimary = FALSE;
> info->pEnt = xf86GetEntityInfo(pScrn->entityList[pScrn->numEntities - 1]);
> if (info->pEnt->location.type != BUS_PCI
> #ifdef XSERVER_PLATFORM_BUS
> @@ -1097,14 +1096,10 @@ Bool RADEONPreInit_KMS(ScrnInfoPtr pScrn, int flags)
> if(xf86IsPrimInitDone(pScrn->entityList[0]))
> {
> info->IsSecondary = TRUE;
> - pRADEONEnt->pSecondaryScrn = pScrn;
> }
> else
> {
> - info->IsPrimary = TRUE;
> xf86SetPrimInitDone(pScrn->entityList[0]);
> - pRADEONEnt->pPrimaryScrn = pScrn;
> - pRADEONEnt->HasSecondary = FALSE;
> }
> }
>
> diff --git a/src/radeon_probe.c b/src/radeon_probe.c
> index ad1e96e..f81ed13 100644
> --- a/src/radeon_probe.c
> +++ b/src/radeon_probe.c
> @@ -169,10 +169,8 @@ radeon_get_scrninfo(int entity_num, void *pci_dev)
> if (!pPriv->ptr) {
> pPriv->ptr = xnfcalloc(sizeof(RADEONEntRec), 1);
> pRADEONEnt = pPriv->ptr;
> - pRADEONEnt->HasSecondary = FALSE;
> } else {
> pRADEONEnt = pPriv->ptr;
> - pRADEONEnt->HasSecondary = TRUE;
> }
> }
>
> @@ -271,10 +269,8 @@ radeon_platform_probe(DriverPtr pDriver,
> if (!pPriv->ptr) {
> pPriv->ptr = xnfcalloc(sizeof(RADEONEntRec), 1);
> pRADEONEnt = pPriv->ptr;
> - pRADEONEnt->HasSecondary = FALSE;
> } else {
> pRADEONEnt = pPriv->ptr;
> - pRADEONEnt->HasSecondary = TRUE;
> }
> pRADEONEnt->platform_dev = dev;
> }
> diff --git a/src/radeon_probe.h b/src/radeon_probe.h
> index 958cb23..258c7be 100644
> --- a/src/radeon_probe.h
> +++ b/src/radeon_probe.h
> @@ -132,12 +132,8 @@ typedef struct {
>
> typedef struct
> {
> - Bool HasSecondary;
> Bool HasCRTC2; /* All cards except original Radeon */
>
> - ScrnInfoPtr pSecondaryScrn;
> - ScrnInfoPtr pPrimaryScrn;
> -
> int fd; /* for sharing across zaphod heads */
> int fd_ref;
> unsigned long fd_wakeup_registered; /* server generation for which fd has been registered for wakeup handling */
> --
> 2.4.3
>
> _______________________________________________
> xorg-driver-ati mailing list
> xorg-driver-ati at lists.x.org
> http://lists.x.org/mailman/listinfo/xorg-driver-ati
More information about the xorg-driver-ati
mailing list