Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f4486c6e authored by Mathias Agopian's avatar Mathias Agopian
Browse files

try to keep omap4 alive

Bug: 10527646
Change-Id: Iec572a910e932115cf4f2e1215142b10cd91bd6f
parent f2e4fcd9
Loading
Loading
Loading
Loading
+2 −5
Original line number Original line Diff line number Diff line
@@ -52,12 +52,9 @@ endif
ifeq ($(TARGET_BOARD_PLATFORM),msm7k)
ifeq ($(TARGET_BOARD_PLATFORM),msm7k)
  LOCAL_CFLAGS += -DADRENO130=1
  LOCAL_CFLAGS += -DADRENO130=1
endif
endif

ifeq ($(TARGET_BOARD_PLATFORM), omap4)
ifeq ($(TARGET_BOARD_PLATFORM), s5pc110)
  LOCAL_CFLAGS += -DWORKAROUND_BUG_10194508=1
  # see Loader.cpp for details
  LOCAL_CFLAGS += -DSYSTEMUI_PBSIZE_HACK=1
endif
endif

ifneq ($(MAX_EGL_CACHE_ENTRY_SIZE),)
ifneq ($(MAX_EGL_CACHE_ENTRY_SIZE),)
  LOCAL_CFLAGS += -DMAX_EGL_CACHE_ENTRY_SIZE=$(MAX_EGL_CACHE_ENTRY_SIZE)
  LOCAL_CFLAGS += -DMAX_EGL_CACHE_ENTRY_SIZE=$(MAX_EGL_CACHE_ENTRY_SIZE)
endif
endif
+0 −29
Original line number Original line Diff line number Diff line
@@ -374,35 +374,6 @@ void *Loader::load_driver(const char* kind,
        ALOGE_IF(!getProcAddress,
        ALOGE_IF(!getProcAddress,
                "can't find eglGetProcAddress() in %s", driver_absolute_path);
                "can't find eglGetProcAddress() in %s", driver_absolute_path);


#ifdef SYSTEMUI_PBSIZE_HACK
#warning "SYSTEMUI_PBSIZE_HACK enabled"
        /*
         * TODO: replace SYSTEMUI_PBSIZE_HACK by something less hackish
         *
         * Here we adjust the PB size from its default value to 512KB which
         * is the minimum acceptable for the systemui process.
         * We do this on low-end devices only because it allows us to enable
         * h/w acceleration in the systemui process while keeping the
         * memory usage down.
         *
         * Obviously, this is the wrong place and wrong way to make this
         * adjustment, but at the time of this writing this was the safest
         * solution.
         */
        const char *cmdline = getProcessCmdline();
        if (strstr(cmdline, "systemui")) {
            void *imgegl = dlopen("/vendor/lib/libIMGegl.so", RTLD_LAZY);
            if (imgegl) {
                unsigned int *PVRDefaultPBS =
                        (unsigned int *)dlsym(imgegl, "PVRDefaultPBS");
                if (PVRDefaultPBS) {
                    ALOGD("setting default PBS to 512KB, was %d KB", *PVRDefaultPBS / 1024);
                    *PVRDefaultPBS = 512*1024;
                }
            }
        }
#endif

        egl_t* egl = &cnx->egl;
        egl_t* egl = &cnx->egl;
        __eglMustCastToProperFunctionPointerType* curr =
        __eglMustCastToProperFunctionPointerType* curr =
            (__eglMustCastToProperFunctionPointerType*)egl;
            (__eglMustCastToProperFunctionPointerType*)egl;
+20 −1
Original line number Original line Diff line number Diff line
@@ -413,7 +413,25 @@ EGLSurface eglCreateWindowSurface( EGLDisplay dpy, EGLConfig config,
        // of our native format. So if sRGB gamma is requested, we have to
        // of our native format. So if sRGB gamma is requested, we have to
        // modify the EGLconfig's format before setting the native window's
        // modify the EGLconfig's format before setting the native window's
        // format.
        // format.

#if WORKAROUND_BUG_10194508
#warning "WORKAROUND_10194508 enabled"
        EGLint format;
        if (!cnx->egl.eglGetConfigAttrib(iDpy, config, EGL_NATIVE_VISUAL_ID,
                &format)) {
            ALOGE("eglGetConfigAttrib(EGL_NATIVE_VISUAL_ID) failed: %#x",
                    eglGetError());
            format = 0;
        }
        if (attrib_list) {
            for (const EGLint* attr = attrib_list; *attr != EGL_NONE;
                    attr += 2) {
                if (*attr == EGL_GL_COLORSPACE_KHR &&
                        dp->haveExtension("EGL_KHR_gl_colorspace")) {
                    format = modifyFormatColorspace(format, *(attr+1));
                }
            }
        }
#else
        // by default, just pick RGBA_8888
        // by default, just pick RGBA_8888
        EGLint format = HAL_PIXEL_FORMAT_RGBA_8888;
        EGLint format = HAL_PIXEL_FORMAT_RGBA_8888;


@@ -444,6 +462,7 @@ EGLSurface eglCreateWindowSurface( EGLDisplay dpy, EGLConfig config,
                }
                }
            }
            }
        }
        }
#endif
        if (format != 0) {
        if (format != 0) {
            int err = native_window_set_buffers_format(window, format);
            int err = native_window_set_buffers_format(window, format);
            if (err != 0) {
            if (err != 0) {