linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Re: External Monitor under Pismo
@ 2001-04-04  9:21 Iain Sandoe
  2001-04-04 17:01 ` Andrew Sharp
  0 siblings, 1 reply; 53+ messages in thread
From: Iain Sandoe @ 2001-04-04  9:21 UTC (permalink / raw)
  To: Tuomas Kuosmanen, E.  Jason  Stewart
  Cc: Andrew Sharp, E.  Jason  Stewart, debian-powerpc, stewart.sadler,
	linuxppc-dev


>> Since I'm mirroring the LCD I only get 1024x768, and the pismo can
>> drive a 1600x1200@16 bit depth. So what needs to happen to aty128fb.c
>> to support the external monitor, and what can I do to make it happen??
>>
>
> That is beyond *me* but maybe someone else knows. I am just the artist
> dude 'round the corner who likes to hack with perl and stuff.. :-)
>
> I think there is no support for the external monitor in that sense in
> the driver. In macos it can do real dualhead, so that would be possible
> at least in theory, and it would be pretty nice. But currently I think
> the mirrored display is all we have for Pismo. Which works nice for
> projectors though.

My understanding is that it still needs adding - as a first step you need
someone who has signed the NDA to get the specs for the ATI chips... and
understands how to write X servers... ;-)

you could try asking Ani Joshi?
ciao,
Iain.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 53+ messages in thread
* Re: External Monitor under Pismo
@ 2001-04-04 17:29 Iain Sandoe
  2001-04-05  1:58 ` Andrew Sharp
  0 siblings, 1 reply; 53+ messages in thread
From: Iain Sandoe @ 2001-04-04 17:29 UTC (permalink / raw)
  To: Andrew Sharp
  Cc: Tuomas Kuosmanen, E. Jason Stewart, debian-powerpc,
	stewart.sadler, linuxppc-dev


> One has to question whether anyone would be interested in adding
> this to a frame buffer driver, assuming that it isn't already
> there.

because it's useful? ;-)

>Perhaps you would be able to get a lot more direct info from
> another list, like one dedicated more to laptops or X.

well maybe.. - whoever asked the original question? ;-)

> I've actually seen an XF86Config for driving the external monitor at
> different resolution(s) from the LCD, but I can't find that info at
> the moment.  I don't know if it works with the frame buffer
> server/driver, but I know that it works with the mach64 server for
> 3.3.6.  If I could find it, it would be worth trying....

yes - mach64 (IIRC OK on Lombard) - but the Pismo has the later chip set
which isn't done yet (AFAIK).
Iain.

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 53+ messages in thread
* External Monitor under Pismo
@ 2001-04-02 20:18 Jason E. Stewart
  2001-04-03 11:24 ` Andrew Sharp
  0 siblings, 1 reply; 53+ messages in thread
From: Jason E. Stewart @ 2001-04-02 20:18 UTC (permalink / raw)
  To: debian-powerpc, stewart.sadler, linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 806 bytes --]

Hey All,

So after 7 months of flailing I finally got my Pismo to run it's
external monitor port, yeah!!!

3 days before I had a talk to give about our OpenSource project, I
realized I was going to be using OpenOffice under linux, and I
couldn't actually drive a projector... So after I got done panicing I
hit google. I find a link on the YDL lists about the 'mirror' program
that appears to have been originally written by Paul Mackeras.

It gives me the functionality I need, but unfortunately it doesn't
seem to work with 2.4 kernels, only 2.2. The program is doing some
pretty low-level memory mojo which I am clueless about.

Could someone slightly wiser point out what would change between 2.2
and 2.4 that would cause this to break? Is it the base memory offset
for the framebuffer?

Cheers!
jas.


[-- Attachment #2: mirror2.c --]
[-- Type: application/octet-stream, Size: 3644 bytes --]

/*
*  Copyright (C) 1996 Paul Mackerras (paulus@linuxcare.com.au)
*
*  This program is free software; you can redistribute it and/or
*  modify it under the terms of the GNU General Public License
*  as published by the Free Software Foundation; either version
*  2 of the License, or (at your option) any later version.
*
*  Minor changes made by Stewart J Sadler (stewart.sadler@roke.co.uk) Oct 2000 
*/
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <sys/types.h>
#include <sys/fcntl.h>
#include <sys/mman.h>

/* SJS apparently not used 
static inline void eieio()
{
   asm volatile("eieio" : :);
} */

unsigned long regs;

/************************************************************************/
static inline unsigned int ld(int regno)
{
    unsigned int x;

    asm volatile ("lwbrx %0,0,%1; eieio" : "=r" (x) : "r" (regs + regno));
    return x;
}

/************************************************************************/
static inline void st(int regno, unsigned int x)
{
    asm volatile ("stwbrx %0,0,%1; eieio" : : "r" (x), "r" (regs + regno));
}

/************************************************************************/
static void print_usage(void)
{
  printf("Usage = mirror2 [-h ][-o mirror_level ][-m offset]\n");
  printf("  -h Help/ print usage\n");
  printf("  -o Set mirroring to mirror_level (0=off 1=on ?)\n");
  printf("  -m PCI offset for device as a Hex number\n");
}


/************************************************************************/
static void get_arguments(int ac, char **av,int *on,unsigned long *offset)
{
  int arg;
  char *thisArg;
  
  /* defaults */
  *on=1;
  *offset=0xa0000000;
  
  if(ac==1)
  {
     print_usage();
  }
  for(arg=1;arg<ac;arg++)
  {
     thisArg=av[arg];
     if(thisArg[0]=='-')
     {
        switch(tolower(thisArg[1]))
        {
        case 'o':
           *on=1;
           if(arg+1<ac)
           {
                arg++;
                *on=atoi(av[arg]);
                printf("Mirroring level = %d\n",*on);
           }
           break;
        case 'm':
           if(arg+1<ac)
           {
                arg++;
                sscanf(av[arg],"%lx",offset);
                printf("Mirror Offset = %lX\n",*offset);
           }
           break;
        case 'h':
           print_usage();
           break;
        }
     }
  }
}

/************************************************************************/
int main(int ac, char **av)
{
    int fd, on;
    int a, x;
    unsigned long memoryOffset=0x81000000;
    
    if ((fd = open("/dev/mem", O_RDWR)) < 0) {
         perror("/dev/mem");
         exit(1);
    }

    get_arguments(ac,av,&on,&memoryOffset);

    regs = (unsigned long)
        mmap(0, 0x1000, PROT_READ|PROT_WRITE, MAP_SHARED, fd, memoryOffset);
    if (regs == -1) {
         perror("mmap");
         exit(1);
    }

    st(0x300, ld(0x200));
    st(0x304, ld(0x204));
    st(0x308, ld(0x208));
    st(0x30c, ld(0x20c));
    st(0x324, ld(0x224));
    st(0x32c, ld(0x22c));

    st(0x3f8, on? ((ld(0x50) & 0x700) | 0x2210000): 0x4000000);

    st(0x3e0, ld(0x2e0));
    st(0x3e4, ld(0x2e4));

    x = ld(0x8) & ~0xff;
    st(0x8, x | 2);
    a = ld(0x9);
    st(0x8, x | 0xaa);
    st(0x9, a & ~0x20000);

    st(0x8, x | 3);
    a = ld(0x9);
    st(0x8, x | 0xab);
    st(0x9, a);

    st(0x8, x | 4);
    a = ld(0x9);
    st(0x8, 0xac);
    st(0x9, a);

    st(0x58, (ld(0x58) & ~0x10));

    st(0x54, on? (ld(0x54) | 0x8000): (ld(0x54) & ~0x8000));

    exit(0);
}

[-- Attachment #3: Type: text/plain, Size: 1 bytes --]



^ permalink raw reply	[flat|nested] 53+ messages in thread

end of thread, other threads:[~2001-05-07  8:15 UTC | newest]

Thread overview: 53+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-04-04  9:21 External Monitor under Pismo Iain Sandoe
2001-04-04 17:01 ` Andrew Sharp
2001-04-04 18:43   ` Jason E. Stewart
2001-04-04 18:01     ` Michel Dänzer
2001-04-04 19:28       ` Jason E. Stewart
2001-04-04 21:45         ` Michel Dänzer
2001-04-04 23:19           ` Jason E. Stewart
2001-04-04 22:22             ` Michel Dänzer
2001-04-05 19:55               ` Jason E. Stewart
2001-04-05 19:48                 ` Michel Dänzer
2001-04-05 21:49                   ` Jason E. Stewart
2001-04-05 23:46               ` Jason E. Stewart
2001-04-05 23:28                 ` Michel Dänzer
2001-04-06  3:04                   ` Steven Hanley
     [not found]                   ` <87itjmf7lf.fsf_-_@amadeus.openinformatics.com>
2001-04-30 23:03                     ` Success! (was Re: External Monitor under Pismo) Michel Dänzer
2001-05-04  2:10                       ` Jason E. Stewart
2001-05-03 22:18                         ` Michel Dänzer
2001-05-04  9:08                           ` Jason E. Stewart
2001-05-04 12:05                             ` Michel Dänzer
2001-05-04 17:14                               ` Jason E. Stewart
2001-05-04 17:16                                 ` Jason E. Stewart
2001-05-05  1:37                                 ` Michel Dänzer
2001-05-05  9:38                                   ` Jason E. Stewart
2001-05-05 17:59                                     ` Michel Dänzer
2001-05-05 21:14                                       ` Jason E. Stewart
2001-05-06 13:32                                         ` Michel Dänzer
2001-05-06 21:55                                           ` Jason E. Stewart
2001-05-07  8:15                                             ` Michel Dänzer
2001-05-04 12:29                             ` Benjamin Herrenschmidt
2001-05-04 13:34                               ` Sven LUTHER
2001-05-04 13:57                                 ` Benjamin Herrenschmidt
2001-05-04 14:06                                   ` Sven LUTHER
2001-05-04 14:13                                     ` Benjamin Herrenschmidt
2001-05-04 14:14                                     ` Geert Uytterhoeven
2001-05-04 14:23                                       ` Sven LUTHER
2001-05-04 14:54                                       ` Benjamin Herrenschmidt
2001-05-04 15:05                                         ` Ramprasad Rao
2001-05-04 15:09                                           ` Benjamin Herrenschmidt
2001-05-04 15:17                                             ` Ramprasad Rao
2001-05-04 20:50                                       ` Michael Schmitz
2001-05-05  1:03                                         ` Benjamin Herrenschmidt
2001-05-05 18:49                                           ` Michael Schmitz
2001-05-04 17:10                               ` Jason E. Stewart
  -- strict thread matches above, loose matches on Subject: below --
2001-04-04 17:29 External Monitor under Pismo Iain Sandoe
2001-04-05  1:58 ` Andrew Sharp
2001-04-05  5:55   ` Jason E. Stewart
2001-04-02 20:18 Jason E. Stewart
2001-04-03 11:24 ` Andrew Sharp
2001-04-03 15:15   ` Tuomas Kuosmanen
2001-04-04  1:12     ` Steven Hanley
2001-04-04  2:03     ` Jason E. Stewart
2001-04-04  8:38       ` Tuomas Kuosmanen
2001-04-03 18:08   ` Jason E. Stewart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).